Quote:
Originally Posted by Swift_
Untested
pawn Код:
if(strcmp(cmdtext, "/nos", true) == 0) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, color, "Must be in vehicle to use this command!"); AddVehcileComponent(GetPlayerVehicleID(playerid), 1010); SendClientMessage(playerid, color, "Nos added"); return 1; }
|
This command doesn't check if the player is on a nos-addable vehicle. If you'll type that command on a bike or in a vehicle, which can't get NOS, you'll crash.