/open and /close don't work.
#3

pawn Код:
//on top
new IsOpened,Gate;

//OnGameModeinit
Gate = CreateObject(2990,2479.87768555,-1720.38623047,16.46136665,0.00000000,0.00000000,179.99993896);
IsOpened=0;
pawn Код:
if (strcmp("/open", cmdtext, true, 10) == 0)
    {
        if(IsOpened == 1) return SendClientMessage(playerid, 0xFFFCFFF, " The Gate Is Already Opened ");
        IsOpened =1;
        SendClientMessage(playerid, 0xFFFCFFF, " You've opened the gate please close it ");
        MoveObject(Gate,2479.87768555,-1720.38623047,10.46136665,3.00,0.00000000,0.00000000,179.99993896);
        SetTimer("close", 10000, 0);//the gate will close after 10 seconds
       
       return 1;
    }
if (strcmp("/close", cmdtext, true, 10) == 0)
    {
        if(IsOpened == 0) return SendClientMessage(playerid, 0xFFFCFFF, " The Gate Is Already Closed ");
        IsOpened =0;
        MoveObject(Gate,2479.87768555,-1720.38623047,16.46136665,3.00,0.00000000,0.00000000,179.99993896);
     }

pawn Код:
forward close();
public close()
{
     If(IsOpened == 1)
     {      
           MoveObject(Gate,2479.87768555,-1720.38623047,16.46136665,3.00,0.00000000,0.00000000,179.99993896);
           IsOpened=0;
     }
}
Reply


Messages In This Thread
/open and /close don't work. - by Gangster-rocks - 31.05.2012, 12:54
Re: /open and /close don't work. - by Jonny5 - 31.05.2012, 13:31
Re: /open and /close don't work. - by HuSs3n - 31.05.2012, 13:39
Re: /open and /close don't work. - by [jS]Thomas - 31.05.2012, 13:39
Re: /open and /close don't work. - by Gangster-rocks - 31.05.2012, 14:12
Re: /open and /close don't work. - by Gangster-rocks - 31.05.2012, 14:22
Re: /open and /close don't work. - by Gangster-rocks - 31.05.2012, 14:24
Re: /open and /close don't work. - by HuSs3n - 31.05.2012, 14:42
Re: /open and /close don't work. - by newbienoob - 31.05.2012, 14:47
Re: /open and /close don't work. - by HuSs3n - 31.05.2012, 15:11

Forum Jump:


Users browsing this thread: 2 Guest(s)