Derby - Selecting a winner
#1

Hello,
So i've recently made a derby system, works perfectly with 2 players but when there are 3 players it gets messy.
Here's the problem.
If there are 3 players playing, and if one of them falls off the other two wins the round, I've been trying to find the problem but i can't, Using height check at onplayerupdate.
PHP код:
public OnPlayerUpdate(playerid)
{
    if(
DB_On == && DB_Participants>&& DB_Onhold == && DB_Map==1)
    {
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    if(
2.1000)
    {
        
Dcar(playerid);
        
DB_Member[playerid]=0;
        
DB_Participants--;
        
Slap(playerid);
        
SpawnPlayer(playerid);
    }
    }
    if(
DB_On == && DB_Participants==&& DB_Onhold == 0)
    {
    if(
DB_Member[playerid]==1)
    {
    
Dcar(playerid);
    
DerbyWin(playerid);
    }
    }
    return 
1;

Should i use a timer instead?
Reply


Messages In This Thread
Derby - Selecting a winner - by Ebisu - 31.07.2017, 08:47
Re: Derby - Selecting a winner - by Ebisu - 31.07.2017, 15:46
Re: Derby - Selecting a winner - by Tord - 31.07.2017, 16:24
Re: Derby - Selecting a winner - by Ebisu - 31.07.2017, 16:34

Forum Jump:


Users browsing this thread: 1 Guest(s)