[pomoc] Respawn auta

Započeo Mitroglu
28. Sep. 2015. Zaključano
340
pregleda
2
postova
Mitroglu
2
Street Runner
28. Sep. 2015.
if(newkeys & KEY_ACTION)
{
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //samp forum
{
if(MehanicarVozila(GetPlayerVehicleID(playerid)))
    {
    if(PlayerInfo != POSAO_MEHANICAR) return SCM(playerid, -1, ""SPLAVA"[BI:RP] "BELA"Nemas posao mehanicara!");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid, pX, pY, pZ);
new Float:vX1, Float:vY1, Float:vZ1;
new Found = 0, vid = 0;
while((vid < MAX_VOZILA) && (!Found))
{
    vid++;
GetVehiclePos(vid,vX1,vY1,vZ1);
if((floatabs(pX - vX1) < 7.0) && (floatabs(pY - vY1) < 7.0) && (floatabs(pZ - vZ1) < 7.0) && (vid != GetPlayerVehicleID(playerid)))
{
Found = 1;
if(MehanicarVozila(GetPlayerVehicleID(playerid))) return SCM(playerid,-1,"BI:RP | "CRVENA"Ne mozete zakaciti vozilo od mehanicara!");
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
          DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
    SCM(playerid,-1,"BI:RP | "HZELENA"Vozilo je otkaceno!");
}
else
{
AttachTrailerToVehicle(vid, GetPlayerVehicleID(playerid));
SCM(playerid,-1,"BI:RP | "HZELENA"Vozilo je zakaceno!");
}
}
}
if(!Found)
  {
SCM(playerid,-1,"BI:RP | "CRVENA"Nema vozila u blizini!");
}
}
}
}
Vodka Play
5
Legenda Foruma

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha