11.09.2018, 23:32
If I do something like this would it give bugs or would it be wrong?
PHP код:
MessageModes(playerid)
{
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
{
if(IsPlayerConnected(i))
{
switch(Player[i][Mode])
{
case GAME_DM:
{
SendClientMessageEx(i, -1, "DEATHMATCH: %s(%d) joined (players: %d/20)", Player[playerid][Name], playerid, Players_DM);
}
case GAME_DERBY:
{
SendClientMessageEx(i, -1, "DERBY:%s(%d) joined (players: %d/20)", Player[playerid][Name], playerid, Players_Derby);
}
case GAME_MINIGUN:
{
SendClientMessageEx(i, -1, "MINIGUN: %s(%d) joined (players: %d)", Player[playerid][Name], playerid, Players_Minigun);
}
case GAME_ROCKET:
{
SendClientMessageEx(i, -1, "ROCKET: %s(%d) joined (players: %d)", Player[playerid][Name], playerid, Players_Rocket);
}
}
}
}
return 1;
}