A Little Help With Checking If That Player Admin
#1

hello,

can someone fix this code, i have compile but it dint have warning or error but when i login as admin i cant go to that place here is the code


Код:
   if(strcmp("/mubarrak48house", cmdtext, true, 10) == 0)
       {
	      if(IsPlayerLAdmin(playerid))
		{
			SetPlayerPos(playerid,2324.6475,-1147.8363,1050.7101);
  		       SetPlayerFacingAngle(playerid,358.6484);
 			SetPlayerInterior(playerid, 12);
  			SetCameraBehindPlayer(playerid);
 	 		ResetPlayerWeapons(playerid);
			GameTextForPlayer(playerid, "~p~Welcome To Administrator [SEX] or [MyS]Mubarrak48 House", 3000, 3);
		 }
		 else
		 {
		      SendClientMessage(playerid, ADMIN_RED, "You Must Be An Administrator To Go To Mubarrak48 house");
		 }
		 return 1;
	 }
Reply
#2

What happens? what do you see ? or where do you teleport when you use that command ?
Reply
#3

Код:
if(strcmp("/mubarrak48house", cmdtext, true, 10) == 0)
{	
     if(IsPlayerLAdmin(playerid))
	{
		SetPlayerPos(playerid,2324.6475,-1147.8363,1050.7101);
		SetPlayerFacingAngle(playerid,358.6484);
 		SetPlayerInterior(playerid,12);
  		SetCameraBehindPlayer(playerid);
	 	ResetPlayerWeapons(playerid);
		GameTextForPlayer(playerid, "~p~Welcome To Administrator [SEX] or [MyS]Mubarrak48 House", 3000, 3);
	}
	else
	{
		SendClientMessage(playerid,0xAFAFAFAA,"You must be an Administrator to go to Mubarrak48 house");
	}
	return 1;
}
I fixed it, you had a mistake "if(IsPlayerLAdmin(playerid))" It should be like that if(IsPlayerAdmin(playerid))
Now, take it... login your rcon, and try it.
If It won't help, tell me what happens. And I'll try to help.
Reply
#4

ok it help thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)