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;
}
|
Originally Posted by [NaB
Hiitch - No srsly, Im a NaB ! ]
remove the else's and just use if. |
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;
}
|
Originally Posted by Mujib
Already Fixes, just added a brackety
|