31.07.2017, 08:47
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.
Should i use a timer instead?
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 == 1 && DB_Participants>1 && DB_Onhold == 0 && DB_Map==1)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(z < 2.1000)
{
Dcar(playerid);
DB_Member[playerid]=0;
DB_Participants--;
Slap(playerid);
SpawnPlayer(playerid);
}
}
if(DB_On == 1 && DB_Participants==1 && DB_Onhold == 0)
{
if(DB_Member[playerid]==1)
{
Dcar(playerid);
DerbyWin(playerid);
}
}
return 1;
}