SA-MP Forums Archive
3 Times PlayerToPoint - 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: 3 Times PlayerToPoint (/showthread.php?tid=104683)



3 Times PlayerToPoint - Mujib - 25.10.2009

How can i have 3 times PlayerToPoint

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	    if(strcmp(cmdtext,"/anglzopen",true) == 0)
 			{
			if(PlayerToPoint(8,playerid,-2127.4109, -80.8272, 37.0937))
			{
			MoveObject(anglzg1,-2127.4109, -80.8272, 0.00, 4);
			SetTimer("SluitAnglzGate",3000,0);
			return 1;
			}
			else if(PlayerToPoint(8,playerid,-2041.2590, -252.2284, 37.0937))
			MoveObject(anglzg2,-2041.2590, -252.2284, 0.00, 4);
			SetTimer("SluitAnglzGate",3000,0);
			{
			else if(PlayerToPoint(8,playerid,-2040.4067, -141.8324, 37.0937))
			MoveObject(anglzg2,-2040.4067, -141.8324, 0.00, 4);
			SetTimer("SluitAnglzGate",3000,0);
			{
			return 1;
			}
			}
      return 0;
}
if I do this, it gives me erros


Re: 3 Times PlayerToPoint - Hiitch - 25.10.2009

remove the else's and just use if.


Re: 3 Times PlayerToPoint - Mujib - 25.10.2009

Quote:
Originally Posted by [NaB
Hiitch - No srsly, Im a NaB ! ]
remove the else's and just use if.
EDIT: Aint Workind


Re: 3 Times PlayerToPoint - Peter_Corneile - 25.10.2009

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
        if(strcmp(cmdtext,"/anglzopen",true) == 0)
            {
            if(PlayerToPoint(8,playerid,-2127.4109, -80.8272, 37.0937))
            {
            MoveObject(anglzg1,-2127.4109, -80.8272, 0.00, 4);
            SetTimer("SluitAnglzGate",3000,0);
            return 1;
            }
            if(PlayerToPoint(8,playerid,-2041.2590, -252.2284, 37.0937))
            {
            MoveObject(anglzg2,-2041.2590, -252.2284, 0.00, 4);
            SetTimer("SluitAnglzGate",3000,0);
             return 1;
            }
           
            if(PlayerToPoint(8,playerid,-2040.4067, -141.8324, 37.0937))
            {
            MoveObject(anglzg2,-2040.4067, -141.8324, 0.00, 4);
            SetTimer("SluitAnglzGate",3000,0);
              return 1;
            }
           
           
            }
           
      return 0;
}
This should work


Re: 3 Times PlayerToPoint - Mujib - 25.10.2009

Already Fixes, just added a brackety


Re: 3 Times PlayerToPoint - Peter_Corneile - 25.10.2009

Quote:
Originally Posted by Mujib
Already Fixes, just added a brackety
Alright