help.
#6

or you can check the names when the player uses the command...

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;
}
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.
Reply


Messages In This Thread
help. - by kepa333 - 15.03.2013, 12:55
Re: help. - by Bikken - 15.03.2013, 12:59
Re: help. - by kepa333 - 15.03.2013, 13:10
Re: help. - by P3DRO - 15.03.2013, 13:18
Re: help. - by kepa333 - 15.03.2013, 13:21
Re: help. - by Threshold - 15.03.2013, 13:22
Re: help. - by DiGiTaL_AnGeL - 15.03.2013, 13:23
Re: help. - by Konstantinos - 15.03.2013, 13:26
Re: help. - by kepa333 - 15.03.2013, 14:48
Re: help. - by kepa333 - 15.03.2013, 15:13

Forum Jump:


Users browsing this thread: 2 Guest(s)