SA-MP Forums Archive
CreateVehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CreateVehicle (/showthread.php?tid=457812)



CreateVehicle - Sellize - 13.08.2013

Yeah I have this CMD, it works fine but when I exit the car it respawns at the place i typed the cmd. Anyway of preventing it of respawning?

pawn Код:
COMMAND:av(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] > 0)
    {
        new Float:x, Float:y, Float:z;
        new v;
        GetPlayerPos(playerid, x, y, z);
        if(IsPlayerInAnyVehicle(playerid))
        {
            new veh;
            veh = GetPlayerVehicleID(playerid);
            DestroyVehicle(veh);
        }
        v = CreateVehicle(411, x, y, z, 0, 0, 0, 1);
        PutPlayerInVehicle(playerid, v, 0);
    }
    else
    {
        ServerMessage(playerid, "Jij kan dit niet doen.");
    }
    return 1;
}



Re: CreateVehicle - IstuntmanI - 13.08.2013

https://sampwiki.blast.hk/wiki/CreateVehicle

The last parameter is respawn_delay, which is in seconds, and you put 1, so it will respawn right after you leave the vehicle, if you don't want it to respawn, use -1.


Re: CreateVehicle - Sellize - 13.08.2013

Quote:
Originally Posted by IstuntmanI
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/CreateVehicle

The last parameter is respawn_delay, which is in seconds, and you put 1, so it will respawn right after you leave the vehicle, if you don't want it to respawn, use -1.
Awesome thanks