Help with entrances
#1

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


Messages In This Thread
Help with entrances - by Burning - 11.08.2014, 12:38
Re: Help with entrances - by LarryTiger - 11.08.2014, 13:24
Re: Help with entrances - by Burning - 11.08.2014, 14:09

Forum Jump:


Users browsing this thread: 2 Guest(s)