3 Times PlayerToPoint
#1

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
Reply
#2

remove the else's and just use if.
Reply
#3

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

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
Reply
#5

Already Fixes, just added a brackety
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)