SA-MP Forums Archive
Help with entrances - 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: Help with entrances (/showthread.php?tid=531179)



Help with entrances - Burning - 11.08.2014

Hello im creating entrances script, cant get what's wrong here, can u check my code?
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (newkeys & KEY_SECONDARY_ATTACK)
	{
	    for(new i = 0; i < MAX_TUNELIU; i++)
	    {
		    if(IsPlayerInRangeOfPoint(playerid, 2.0, Tuneliai[i][EnterPOSX],Tuneliai[i][EnterPOSY],Tuneliai[i][EnterPOSZ]))
		    {
		        new Float:x,Float:y,Float:z;
		        x = Tuneliai[i][ExitPOSX];
		        y = Tuneliai[i][ExitPOSY];
		        z = Tuneliai[i][ExitPOSZ];
				new interjeras;
				interjeras = Tuneliai[i][Interjeras];
				SetPlayerInterior(playerid,interjeras);
		        SetPlayerPos(playerid,x,y,z);
		    }
		    if(IsPlayerInRangeOfPoint(playerid, 2.0, Tuneliai[i][ExitPOSX],Tuneliai[i][ExitPOSY],Tuneliai[i][ExitPOSZ]))
		    {
		        new Float:x,Float:y,Float:z;
		        x = Tuneliai[i][EnterPOSX];
		        y = Tuneliai[i][EnterPOSY];
		        z = Tuneliai[i][EnterPOSZ];
		        SetPlayerPos(playerid,x,y,z);
		        SetPlayerInterior(playerid,0);
		    }
		}
	}
	return 1;
}



Re: Help with entrances - LarryTiger - 11.08.2014

You need to Compile it to found what is wrong/error


Re: Help with entrances - Burning - 11.08.2014

That was obvious, it doesnt send any error/warning's just doesnt work when I want to use entrance