A Command For Specific Player
#1

Well, I am trying to make a command for a specific player.

Code:
    if(strcmp(cmdtext, "/woozie") == 0)
    {
      SetPlayerSkin(playerid, 294);
     return 1;
    }
That is the base command. I need it locked for other players but only can perform by me.
My Name would be: ||.Rier.||

Thanks Guys
Reply
#2

pawn Code:
new
    pName[20 char]
;
GetPlayerName(playerid, pName, sizeof(pName));
if(!strcmp("||.Rier.||", pName, true))
{
    // Rest of ur command
} else return SendClientMessage(playerid, 0xFFFFFFFF, "Only ||.Rier.||");
Reply
#3

Doesn't work...

I used this:

Code:
    new pName[20 char]
    ;
    GetPlayerName(playerid, pName, sizeof(pName));
    if(!strcmp("||.Rier.||", pName, true))
    if(strcmp(cmdtext, "/woozie") == 0)
    {
      SetPlayerSkin(playerid, 294);
     return 1;
     } else return SendClientMessage(playerid, 0xFFFFFFFF, "Only ||.Rier.||");
Reply
#4

Under the command:

pawn Code:
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
if(strcmp(Name, "||.Rier.||", false)) return SendClientMessage(playerid, COLOR, "* This command is only for ||.Rier.||! Go away or I will suck your nuts!");
Reply
#5

Thank You Adas and Ryder.

Probelm is Solved.

Administrator or Moderator may close / delete this topic. Thank You
Reply
#6

No problem
Reply


Forum Jump:


Users browsing this thread: