A Command For Specific Player - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A Command For Specific Player (
/showthread.php?tid=147042)
A Command For Specific Player -
||.Rier.|| - 10.05.2010
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
Re: A Command For Specific Player -
RyDeR` - 10.05.2010
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.||");
Re: A Command For Specific Player -
||.Rier.|| - 10.05.2010
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.||");
Re: A Command For Specific Player -
¤Adas¤ - 10.05.2010
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!");
Re: A Command For Specific Player -
||.Rier.|| - 10.05.2010
Thank You Adas and Ryder.
Probelm is Solved.
Administrator or Moderator may close / delete this topic. Thank You
Re: A Command For Specific Player -
¤Adas¤ - 10.05.2010
No problem