Event Help!
#2

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:
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;
}
Also, the timer you have set in OnGameModeInit will continually call this method ever 0.5 seconds; just something to bear in mind!
Reply


Messages In This Thread
Event Help! - by Hamudi_Chi - 18.12.2010, 15:48
Re: Event Help! - by Benjo - 18.12.2010, 15:56

Forum Jump:


Users browsing this thread: 1 Guest(s)