Need some help with OnPlayerDeath
#4

I know it's quite different from your code, sorry for that

PHP Code:
// I will suppose that there are 2 duelling teams
#define TEAM_DUEL_ONE     0
#define TEAM_DUEL_TWO     1
#define MAX_DUEL_TEAMS     2
new InviterID
InvitedID
boolIsPlayerInvitedToDuel[MAX_PLAYERS],
PlayersInTeam[MAX_DUEL_TEAMS]; // <- this will be important
// Somewhere, command or anything else after the duel invitation gets accepted
InviterID playerid;
InvitedID invitedid;
IsPlayerInvitedToDuel[playerid] = true;
IsPlayerInvitedToDuel[invitedid] = true;
PlayersInTeam[TEAM_DUEL_ONE]++; // playerid just joined team 1!
PlayersInTeam[TEAM_DUEL_TWO]++; // invitedid just joined team 2!
// Here we will ask to playerid and invitedid to add 2 players in their duelling team
// When someone accepts to join their squad increment PlayersInTeam and switch IsPlayerInvitedToDuel to true condition
// Now under OnPlayerDeath if IsPlayerInvitedToDuel[playerid] == true decrement PlayersInTeam[dead player team]
// If PlayersInTeam[TEAM_DUEL_ONE] <= 0 TEAM_DUEL_TWO wins and viceversa. 
Reply


Messages In This Thread
Need some help with OnPlayerDeath - by solstice_ - 05.04.2019, 19:11
Re: Need some help with OnPlayerDeath - by v1k1nG - 05.04.2019, 19:18
Re: Need some help with OnPlayerDeath - by solstice_ - 05.04.2019, 19:22
Re: Need some help with OnPlayerDeath - by v1k1nG - 05.04.2019, 20:05
Re: Need some help with OnPlayerDeath - by solstice_ - 05.04.2019, 23:26

Forum Jump:


Users browsing this thread: 1 Guest(s)