Command for a specified nick
#1

How do i make a cmd for a specified nick, only the user with that nick can use that cmd. I forgot the functions and all, could anyone please give me an example cmd?
Reply
#2

Hmm. Try something like this

pawn Код:
CMD:special(playerid, params[])
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    if(strcmp(name,"examplename",false)==0)
    {
    //Your function
    }
    else return SendClientMessage(playerid,-1,"Unknown command");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)