05.06.2017, 14:03
Hi, here is an example of using the OnPlayerCommandText:
And for further information you always have the site dedicated to the learning of PAWN:https://sampwiki.blast.hk/wiki/OnPlayerCommandText
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext,"/lock",true)) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_MSG,"You have to be inside a vehicle."); for(new i=0; i < MAX_PLAYERS; i++) { if(i == playerid) continue; SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,0,1); } return 1; } return 0; }