05.11.2016, 10:37
Hey, I registered an account as I browse this forum a lot. So, let's get to the point. This is my code:
Basically this should choose a random player as the president and the rest of the people as the agents. I already made the event commands etc but this block of code is my problem.
Any fix?
PHP код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pInEvent[i] == 1)
{
new president = random(i);
if(president == playerid)
{
SetPlayerSkin(playerid, 228);
GivePlayerWeapon(playerid, 24, 99999);
}
else if(president != playerid)
{
SetPlayerSkin(playerid, 165);
GivePlayerWeapon(playerid, 23, 99999);
}
Any fix?