Make a commands exclusively for a specific Player - Help Me!
#6

Quote:
Originally Posted by ramshidjafar
I got fixed it!
Код:
if(!strcmp(pname,"Ramshid_Jafar"))
{
	if(strcmp(cmd, "/info", true) == 0) {
	  SetPlayerPos(playerid, 2320.4258, 584.7402, 7.7802);
	  SetPlayerInterior(playerid, 0);
	  return 1;
	}
}
else SendClientMessage(playerid, 0xFFFFFFAA, "You're not Ramshid_Jafar! Don't type Again!");
I'd suggest you making it like this..
pawn Код:
if(strcmp(cmd, "/info", true) == 0)
{
     if(!strcmp(pname,"Ramshid_Jafar")){
      SetPlayerPos(playerid, 2320.4258, 584.7402, 7.7802);
      SetPlayerInterior(playerid, 0);
      return 1;
    }
    else SendClientMessage(playerid, 0xFFFFFFAA, "You're not Ramshid_Jafar! Don't type Again!");
}
'else' will stop from working all commands below this one.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)