A CMD that only someone with a certain name can do
#1

I know. It's an easy question but what is it again?
Reply
#2

if(!strcmp(PlayerName(playerid), "name here" ))

something like that
Reply
#3

pawn Код:
new Name[12];
GetPlayerName(playerid, Name, sizeof(Name));

if(strcmp(Name,"Some_Name",true))
{
//
      return 1;
}
Works?
Reply
#4

It lets everyone without that name do the cmd

EDIT: You didn't include the '!' infront of strcmp
Reply
#5

pawn Код:
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
if(!strcmp(Name,"Some_Name",true))
{
//
      return 1;
}
Reply
#6

pawn Код:
new Name[12];
GetPlayerName(playerid, Name, sizeof(Name));

if(!strcmp(Name,"Some_Name",true))
{
//
      return 1;
}
Reply
#7

I think I noticed that already..

@Shadow: Hey, It's Saget
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)