18.12.2010, 15:56
Working with what you have shown us, it looks like you just need to add a loop in the Event method to cycle through all the players:
Also, the timer you have set in OnGameModeInit will continually call this method ever 0.5 seconds; just something to bear in mind!
pawn Код:
public Event(playerid) // I don't think you need the playerid parameter
{
if(ActiveEvent == 1)
{
if(IsEventOn == 1)
{
for(new i=0; i<MAX_PLAYERS; i++) // loops goes through all players
{
if(PlayerInfo[i][pEvent] == 1)
{
SetPlayerHealth(i, EventHP);
SetPlayerArmour(i, EventArmour);
ResetPlayerAdminWeaponsEx(i);
ResetPlayerWeapons(i);
GivePlayerAdminGun(i, EventWeapon1);
GivePlayerAdminGun(i, EventWeapon2);
GivePlayerAdminGun(i, EventWeapon3);
GivePlayerAdminGun(i, EventWeapon4);
GivePlayerAdminGun(i, EventWeapon5);
}
}
}
}
return 1;
}