Need help with destroying unwanted Veh
#1

Hey I have made a command for admins to spawn a vehicle, but when the are done with this and leave it, it just stays there. But I want something like when they are done with it, it destory the vehicle. I need a little help with it. Here is my code.

pawn Код:
CMD:veh(playerid, params[])
{
    if(GetAdminLevel(playerid) >= 2) {
        new car;
        if(IsPlayerInAnyVehicle(playerid)) return 1;
        if(sscanf(params, "i", car)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /veh [vehid]");
        if(strval(params) >611 || strval(params) <400) return SendClientMessage(playerid, COLOR_RED, "Invalid model id!");
        new Float:x, Float:y, Float:z, Float:a;
        GetPlayerPos(playerid, x,y,z);
        GetPlayerFacingAngle(playerid, a);
        car = CreateVehicle(strval(params), x, y, z,a, -1, -1, 60);
        PutPlayerInVehicle(playerid, car, 0);
    }
    return 1;
}
Reply


Messages In This Thread
Need help with destroying unwanted Veh - by Goldilox - 19.04.2013, 13:20
Re: Need help with destroying unwanted Veh - by PaulDinam - 19.04.2013, 13:42
Re: Need help with destroying unwanted Veh - by Goldilox - 19.04.2013, 21:33
Re: Need help with destroying unwanted Veh - by bensmart469 - 19.04.2013, 21:57
Re: Need help with destroying unwanted Veh - by Goldilox - 20.04.2013, 00:42

Forum Jump:


Users browsing this thread: 3 Guest(s)