How to turn this code into a delay?
#1

Okay, so I have written out a pretty sad little code that deals with gates. I basically pieced together what I saw others do for theirs and this code magically worked. Though this maybe only one of the gates I put in I'm curious as to how the hell I push it as a timer rather then a two cmd to open and close.


PHP код:
        new LSPDgate
PHP код:
    LSPDgate CreateObject(9691539.57263, -1632.3227512.43860,   0.000000.0000089.44900); 
PHP код:
    if (strcmp("/open"cmdtexttrue12) == 0
    {
        if(
IsPlayerInRangeOfPoint(playerid101539.57263, -1632.3227512.43860))
           {
        
MoveObject(LSPDgate1539.5726, -1625.080812.43866);
                
SendClientMessage(playerid0xEF994300"The gate have been opened."); 
        }
        return 
1;
    }
        if (
strcmp("/close"cmdtexttrue6) == 0)
    {
        if(
IsPlayerInRangeOfPoint(playerid101539.57263, -1632.3227512.43860))
        {
                  
MoveObject(LSPDgate1539.57263, -1632.3227512.438606);
              
SendClientMessage(playerid0xEF994300"The gate have been closed.");
                }
        return 
1;
    } 
Yes, I know it's messy.. I'm as I said before on a different thread I'm new to pawno/this type of coding.
Tbh, I'd like to replace /open , /close with one cmd called "/go" with about a 10 second delay.
Reply


Messages In This Thread
How to turn this code into a delay? - by Djsoulhart - 06.03.2014, 22:30
Re: How to turn this code into a delay? - by XK - 06.03.2014, 22:33
Re: How to turn this code into a delay? - by Djsoulhart - 06.03.2014, 22:36
Re: How to turn this code into a delay? - by Luis- - 06.03.2014, 22:38
Re: How to turn this code into a delay? - by XK - 06.03.2014, 22:45
Re: How to turn this code into a delay? - by Djsoulhart - 06.03.2014, 22:52
Re: How to turn this code into a delay? - by Keyhead - 06.03.2014, 22:53
Re: How to turn this code into a delay? - by XK - 06.03.2014, 22:59
Re: How to turn this code into a delay? - by Djsoulhart - 06.03.2014, 23:19
Re: How to turn this code into a delay? - by XK - 06.03.2014, 23:29

Forum Jump:


Users browsing this thread: 1 Guest(s)