CreateVehicle
#1

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;
}
Reply


Messages In This Thread
CreateVehicle - by Sellize - 13.08.2013, 11:58
Re: CreateVehicle - by IstuntmanI - 13.08.2013, 12:00
Re: CreateVehicle - by Sellize - 13.08.2013, 12:02

Forum Jump:


Users browsing this thread: 1 Guest(s)