Double command.
#1

I made a new script that allows me to open a certain gate.
Now, I want to be able use /gate twice, once to open and once to close, just to save free space, and make everything much easier.
Here is my script, seems like no warnings, but it doesn't work, it only opens one side.

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
     if(
strcmp(cmdtext"/gate"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
IsPlayerInRangeOfPoint(playerid101588.9812011719, -1638.041503906314.952730178833))
            {
                
                
MoveObject(obj1588.9812011719, -1638.04150390637.9527301788332.00);
                
                
            }
        }
        return 
1;
    }
else if(
strcmp(cmdtext"/gate"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
IsPlayerInRangeOfPoint(playerid101588.9812011719, -1638.041503906314.952730178833))
            {
                
MoveObject(obj1588.9812011719, -1638.041503906314.9527301788332.00);
                }
        }
        return 
1;
    } 
Reply


Messages In This Thread
Double command. - by Scriptissue - 27.09.2010, 13:17
Re: Double command. - by Mauzen - 27.09.2010, 13:23
Re: Double command. - by Scriptissue - 27.09.2010, 13:54
Re: Double command. - by Cameltoe - 27.09.2010, 13:57
Re: Double command. - by Scriptissue - 27.09.2010, 13:58
Re: Double command. - by Cameltoe - 27.09.2010, 14:03
Re: Double command. - by Scriptissue - 27.09.2010, 14:04
Re: Double command. - by Cameltoe - 27.09.2010, 14:28
Re: Double command. - by Scriptissue - 27.09.2010, 14:28
Re: Double command. - by Cameltoe - 27.09.2010, 14:30

Forum Jump:


Users browsing this thread: 2 Guest(s)