Interaction with objects
#8

It's just a simple timer ... Calvin u are right , but it's more easly if him do something like that:

Код:
new Object[5];

forward Timer();

public OnGameModeInit()
{
	SetTimer("Timer",999,true);
	Object[0] = CreateObject();
	Object[1] = CreateObject();
	Object[2] = CreateObject();
	Object[3] = CreateObject();
	Object[4] = CreateObject();
	return 1;
}

public Timer()
{
	new Float:oPos[3];
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(!IsPlayerConnected(i))
            continue;
            
		for(new obj=0;obj<5;obj++)
		{
		    GetObjectPos(Object[obj],oPos[0],oPos[1],oPos[2]);
		    if(IsPlayerInRangeOfPoint(i,5,oPos[0],oPos[1],oPos[2]))
		    {
		        // Write what you want to do here :) gl
		    }
		}
    }
	return 1;
}
Reply


Messages In This Thread
Interaction with objects - by Laurentziu - 12.03.2015, 07:33
Re: Interaction with objects - by oliverrud - 12.03.2015, 07:36
Re: Interaction with objects - by Laurentziu - 12.03.2015, 07:40
Re: Interaction with objects - by CalvinC - 12.03.2015, 08:00
Re: Interaction with objects - by Laurentziu - 12.03.2015, 08:05
Re: Interaction with objects - by CalvinC - 12.03.2015, 08:09
Re: Interaction with objects - by Laurentziu - 12.03.2015, 08:13
Re: Interaction with objects - by Ph0eniX - 12.03.2015, 08:19
Re: Interaction with objects - by CalvinC - 12.03.2015, 08:27
Re: Interaction with objects - by Laurentziu - 12.03.2015, 08:44

Forum Jump:


Users browsing this thread: 1 Guest(s)