23.04.2012, 18:11
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Your car has not been tuned as you're not in one.");
TuneVehicleRandomly(GetPlayerVehicleID(playerid));
return SendClientMessage(playerid,-1,"Your car has been tuned.");
}
return 0;
}
I've added a check to ensure the player is even in a vehicle too, and removed the pointless return.