Spawn
#6

PHP Code:
stock Initiate_Spawn(playerid)
{
    new 
countindexonlyCurrentGameSpawns[sizeof(SpawnInfo)];
    
    for(new 
i!= sizeof(SpawnInfo); ++i)
    {
        if (
SpawnInfo[i][spawn_gameID] == game_id) {
            
onlyCurrentGameSpawns[count++] = i;
        }
    }
    
    
index onlyCurrentGameSpawns[random(count)];
    
    if(
gTeam[playerid] == TEAM_TERRORIST)
    {
        
SetPlayerPos(playeridSpawnInfo[index][spawn_X], SpawnInfo[index][spawn_Y], SpawnInfo[index][spawn_Z]);
        
SetPlayerFacingAngle(playeridSpawnInfo[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(playeridSpawnInfo[index][spawn_X], SpawnInfo[index][spawn_Y], SpawnInfo[index][spawn_Z]);
        
SetPlayerFacingAngle(playeridSpawnInfo[index][spawn_A]);

        foreach(new 
g_Counter)
        {
            
SetPlayerMarkerForPlayer(playeridx0x00CCFFFF);
        }
    }
    return 
1;

Will this work?
Reply


Messages In This Thread
Spawn - by JaKe Elite - 28.09.2017, 11:47
Re: Spawn - by jlalt - 28.09.2017, 12:10
Re: Spawn - by JaKe Elite - 28.09.2017, 12:42
Re: Spawn - by Misiur - 28.09.2017, 12:46
Re: Spawn - by JaKe Elite - 28.09.2017, 12:48
Re: Spawn - by JaKe Elite - 28.09.2017, 12:53

Forum Jump:


Users browsing this thread: 1 Guest(s)