17.05.2017, 11:32
PHP код:
for(new i = 0; i<MAX_PLAYERS; i++) //Use GetPlayerPoolSize
{
if(IsPlayerConnected(i))
{
TogglePlayerControllable(i, 1);
SCMTA(-1,"{800080}[EVENT STARTED] {fef65b}An Administrator has Started the DM Event!");//This will send every
one a message multiple time forexample if 50 players are connected it will show message to everyone 50 time.
GameTextForPlayer(i, "~W~EVENT ~Y~HAS ~G~BEEN ~B~STARTED!",3000,3); //Use GameTextForAll (outside the loop
if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "{f00f00}[ERROR]: {FFFFFF}You are not authorized to use this command!"); //Why are you checking admin in a `for` loop
EventOpened[playerid] = 0; //This must be out side from the `for` loop.
InEvent[playerid] = 1; //This too
}
}