16.05.2012, 14:49
Код:
public OnPlayerSpawn ( playerid ) { for(new i = 0; i < GetMaxPlayers(); i++) { if (gTeam[playerid] == TEAM_POLICE){ new vR = random(sizeof(Vrand)); SetPlayerPos(playerid, Vrand[vR][0], Vrand[vR][1], Vrand[vR][2]); SendClientMessage(playerid, 0xFFFFFFFF, "Police!"); } else if (gTeam[playerid] == TEAM_SWAT){ new vR = random(sizeof(Vrand)); SetPlayerPos(playerid, Vrand[vR][0], Vrand[vR][1], Vrand[vR][2]); SendClientMessage(playerid, 0xFFFFFFFF, "SWAT!"); } else if (gTeam[playerid] == TEAM_TERRORISTS){ new vR = random(sizeof(Vrand)); SetPlayerPos(playerid, Vrand[vR][0], Vrand[vR][1], Vrand[vR][2]); SendClientMessage(playerid, 0xFFFFFFFF, "Terrorists!"); } else if (gTeam[playerid] == TEAM_HUNTERS){ new vR = random(sizeof(Vrand)); SetPlayerPos(playerid, Vrand[vR][0], Vrand[vR][1], Vrand[vR][2]); SendClientMessage(playerid, 0xFFFFFFFF, "Hunters!"); } } }
Quote:
SendClientMessage(playerid, 0xFFFFFFFF, "Hunters!"); |
Код:
new vR = random(sizeof(Vrand)); SetPlayerPos(playerid, Vrand[vR][0], Vrand[vR][1], Vrand[vR][2]);
// I think is cause of loop
Код:
for(new i = 0; i < GetMaxPlayers(); i++)
THx.. for help , i shall rep you (and sorry for bad english)...