28.09.2017, 12:53
PHP Code:
stock Initiate_Spawn(playerid)
{
new count, index, onlyCurrentGameSpawns[sizeof(SpawnInfo)];
for(new i; i != sizeof(SpawnInfo); ++i)
{
if (SpawnInfo[i][spawn_gameID] == game_id) {
onlyCurrentGameSpawns[count++] = i;
}
}
index = onlyCurrentGameSpawns[random(count)];
if(gTeam[playerid] == TEAM_TERRORIST)
{
SetPlayerPos(playerid, SpawnInfo[index][spawn_X], SpawnInfo[index][spawn_Y], SpawnInfo[index][spawn_Z]);
SetPlayerFacingAngle(playerid, SpawnInfo[index][spawn_A]);
/*foreach(new x : g_Terrorist)
{
SetPlayerMarkerForPlayer(playerid, x, 0xFF6347FF);
}
if(server_bomber == INVALID_PLAYER_ID && !IsPlayerConnected(server_bomber))
{
server_bomber = Iter_Random(g_Terrorist);
ShowPlayerObjective(playerid, 0x33AA33FF, "You are chosen to handle the C4 Bomb.", 5000);
printf("%s has been chosen to handle the C4 bomb.", GetName(server_bomber));
}
Server_AssignBomber();*/
}
else
{
SetPlayerPos(playerid, SpawnInfo[index][spawn_X], SpawnInfo[index][spawn_Y], SpawnInfo[index][spawn_Z]);
SetPlayerFacingAngle(playerid, SpawnInfo[index][spawn_A]);
foreach(new x : g_Counter)
{
SetPlayerMarkerForPlayer(playerid, x, 0x00CCFFFF);
}
}
return 1;
}