View Single Post
Old 05/06/2017, 02:03 PM   #4
tekass
Little Clucker
 
Join Date: May 2017
Posts: 21
Reputation: 0
Post Re: error 004: function "S@@_OnPlayerCommandText" is not implemented

Hi, here is an example of using the OnPlayerCommandText:

Code:
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;
}
And for further information you always have the site dedicated to the learning of PAWN:http://wiki.sa-mp.com/wiki/OnPlayerCommandText
tekass is offline   Reply With Quote