A CMD that only someone with a certain name can do - 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 CMD that only someone with a certain name can do (
/showthread.php?tid=224545)
A CMD that only someone with a certain name can do -
Zack9764 - 12.02.2011
I know. It's an easy question but what is it again?
Re: A CMD that only someone with a certain name can do -
farris - 12.02.2011
if(!strcmp(PlayerName(playerid), "name here" ))
something like that
Re: A CMD that only someone with a certain name can do -
int3s0 - 12.02.2011
pawn Код:
new Name[12];
GetPlayerName(playerid, Name, sizeof(Name));
if(strcmp(Name,"Some_Name",true))
{
//
return 1;
}
Works?
Re: A CMD that only someone with a certain name can do -
Zack9764 - 12.02.2011
It lets everyone without that name do the cmd
EDIT: You didn't include the '!' infront of strcmp
Re: A CMD that only someone with a certain name can do -
Shadow™ - 12.02.2011
pawn Код:
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
if(!strcmp(Name,"Some_Name",true))
{
//
return 1;
}
Re: A CMD that only someone with a certain name can do -
Antonio [G-RP] - 12.02.2011
pawn Код:
new Name[12];
GetPlayerName(playerid, Name, sizeof(Name));
if(!strcmp(Name,"Some_Name",true))
{
//
return 1;
}
Re: A CMD that only someone with a certain name can do -
Zack9764 - 12.02.2011
I think I noticed that already..
@Shadow: Hey, It's Saget