Destory vehicle problem
#5

You always have to return a command to something, else you will keep getting that unknown command thing and it wont work.

pawn Код:
CMD:dveh(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid), string[128];
    if(IsPlayerInVehicle(playerid, vehicleid))
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            DestroyVehicle(vehicleid);
            format(string, sizeof(string), "The %s has been destroyed.", VehicleName(vehicleid));
            SendClientMessage(playerid, YELLOW, string);
        }
    }else{SendClientMessage(playerid, RED, "You need to be in a vehicle to destroy it.");}
    return 1;
}
Fixed your issue here I think.
Reply


Messages In This Thread
Destory vehicle problem - by Duck4coder - 04.01.2014, 07:47
Re: Destory vehicle problem - by Sawalha - 04.01.2014, 08:35
Re: Destory vehicle problem - by Duck4coder - 04.01.2014, 09:04
Re: Destory vehicle problem - by Sawalha - 04.01.2014, 09:42
Re: Destory vehicle problem - by Stefand - 04.01.2014, 09:49
Re: Destory vehicle problem - by PowerPC603 - 04.01.2014, 10:20
Re: Destory vehicle problem - by Konstantinos - 04.01.2014, 10:28
Re: Destory vehicle problem - by Stefand - 05.01.2014, 00:59

Forum Jump:


Users browsing this thread: 1 Guest(s)