Range
#4

Quote:
Originally Posted by Battlezone
Посмотреть сообщение
You can make a timer with a 5s interval that will check the player z coordinate and compare it to the water Z surface coords, if the player Z < water surface Z he loses

Under on player spawn:

Код:
//your code
//...
 
    // Start a 5 second timer to end the anti-spawnkill
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    SetTimerEx("CheckZ", 5000, false, "if", playerid, Z);


//then after on player spawn

forward CheckZ(playerid, zcoord);
 
// The timer function - the code to be executed when the timer is called goes here
public CheckZ(playerid, zcoord)
{
    if(Z<10.00) //10.00 is surface Z for example
    {
    //lose functions and variables
     }
    return 1;
}
Can i do it without timer and making it under OnPlayerUpdate()?
Reply


Messages In This Thread
Range - by Fancy - 07.08.2015, 18:03
Re: Range - by Battlezone - 07.08.2015, 18:06
Re: Range - by SickAttack - 07.08.2015, 18:26
Re: Range - by Fancy - 07.08.2015, 18:37
Re: Range - by SickAttack - 07.08.2015, 18:40
Re: Range - by Fancy - 07.08.2015, 18:41
Re: Range - by SickAttack - 07.08.2015, 18:45
Re: Range - by Fancy - 07.08.2015, 18:48
Re: Range - by SickAttack - 07.08.2015, 19:11
Re: Range - by Battlezone - 08.08.2015, 08:01

Forum Jump:


Users browsing this thread: 1 Guest(s)