15.03.2013, 13:22
or you can check the names when the player uses the command...
Example:
if(strcmp(playersname, "BenzoAMG", true)) means if you compare the string of the player's name and BenzoAMG, if they are not the same, they do not equal 0. If they match however, it DOES equal 0, and the command will continue.
Example:
pawn Код:
CMD:mycommand(playerid, params[])
{
new playersname[MAX_PLAYER_NAME]; //Used to store the player's name
GetPlayerName(playerid, playersname, MAX_PLAYER_NAME); //Save the player's name to the variable
if(strcmp(playersname, "BenzoAMG", true) != 0) return SendClientMessage(playerid, 0xFF0000FF, "Only BenzoAMG can use this command!");
//rest of the command here
return 1;
}