SA-MP Forums Archive
New locker code not working - 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)
+--- Thread: New locker code not working (/showthread.php?tid=489686)



New locker code not working - Zin - 23.01.2014

I extracted this code from my gamemode to make a simple locker filter script it compiles fine but it does not work.

Код:
CMD:ng(playerid, params[])
{
	if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
	{
		if(IsPlayerInRangeOfPoint(playerid(217,160.5935,-2150.8218,3.5423,3.5323,0,0,0,0,0,0) && GetPlayerVirtualWorld(playerid) == 1337 || IsPlayerInRangeOfPoint(playerid,217,160.5935,-2150.8218,3.5423,3.5323,0,0,0,0,0,0)// NG Duty
		{
			ShowPlayerDialog(playerid, NGMENU, DIALOG_STYLE_LIST, "National Guard","Duty\nUniforms\nWeapons\nUndercover\nClear Suspect\nKevlar Vest\nFirst Aid Kit\nAccessories", "Select", "Cancel");
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your NG lockers.");
		}
	}
	return 1;
}