Automatic Gates Open/Close
#10

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
PHP код:
// onplayerconnect
OpenGateTimer(playerid);
    
stock OpenGateTimer(playeridtime)
{
    
SetTimerEx("OpenGateTimer2"3000true"i"playerid);
}
forward OpenGateTimer2(playerid);
public 
OpenGateTimer2(playerid)
{
    for(new 
idx=1idx<MAX_GATESidx++)
    {
    new 
Float:cur[3];
    if(
GateInfo[idx][gModel])
    {
        
GetDynamicObjectPos(GateInfo[idx][gGate], cur[0], cur[1], cur[2]);
        if(
IsPlayerInRangeOfPoint(playerid8cur[0], cur[1], cur[2]) || IsPlayerInRangeOfPoint(playerid8GateInfo[idx][gCX], GateInfo[idx][gCY], GateInfo[idx][gCZ]) || IsPlayerInRangeOfPoint(playerid8GateInfo[idx][gOX], GateInfo[idx][gOY], GateInfo[idx][gOZ]))
        {
            if(
GateInfo[idx][gOwner]!= 0)
            {
                if(!
GateInfo[idx][gStatus]) // open the gate
                
{
                    
GateInfo[idx][gStatus] = 1;
                    
MoveDynamicObject(GateInfo[idx][gGate], GateInfo[idx][gOX], GateInfo[idx][gOY], GateInfo[idx][gOZ], GateInfo[idx][gSpeed], GateInfo[idx][gORX], GateInfo[idx][gORY], GateInfo[idx][gORZ]);
                    
// add a timer to close the gate here
                    
break;
                }
            }
            else return 
0;
            }
        }
    }

(3619) : warning 202: number of arguments does not match definition

OpenGateTimer(playerid);
Reply


Messages In This Thread
Automatic Gates Open/Close - by BulletRaja - 10.01.2018, 17:10
Re: Automatic Gates Open/Close - by solstice_ - 10.01.2018, 19:08
Re: Automatic Gates Open/Close - by BulletRaja - 11.01.2018, 08:11
Re: Automatic Gates Open/Close - by Ritzy2K - 11.01.2018, 12:32
Re: Automatic Gates Open/Close - by jasperschellekens - 11.01.2018, 12:34
Re: Automatic Gates Open/Close - by BulletRaja - 11.01.2018, 12:50
Re: Automatic Gates Open/Close - by jasperschellekens - 11.01.2018, 12:53
Re: Automatic Gates Open/Close - by BulletRaja - 11.01.2018, 13:06
Re: Automatic Gates Open/Close - by jasperschellekens - 11.01.2018, 13:30
Re: Automatic Gates Open/Close - by BulletRaja - 11.01.2018, 14:01

Forum Jump:


Users browsing this thread: 1 Guest(s)