04.01.2014, 09:49
You always have to return a command to something, else you will keep getting that unknown command thing and it wont work.
Fixed your issue here I think.
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;
}