SA-MP Forums Archive
A Little Help With Checking If That Player Admin - 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 Little Help With Checking If That Player Admin (/showthread.php?tid=142635)



A Little Help With Checking If That Player Admin - AK47317 - 19.04.2010

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;
	 }



Re: A Little Help With Checking If That Player Admin - Adil - 19.04.2010

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


Re: A Little Help With Checking If That Player Admin - Eliran Pesahov - 19.04.2010

Код:
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.


Re: A Little Help With Checking If That Player Admin - AK47317 - 20.04.2010

ok it help thx