[Pedido] Spawn Gangs
#3

pawn Код:
new Float:SpawnOrg1[][] =
{
    {0.0, 0.0, 0.0},
    {0.0, 0.0, 0.0},
    {0.0, 0.0, 0.0},
    {0.0, 0.0, 0.0},
    {0.0, 0.0, 0.0}
    //Add mais se tiver
};

new Float:SpawnOrg2[][] =
{
    {0.0, 0.0, 0.0},
    {0.0, 0.0, 0.0},
    {0.0, 0.0, 0.0},
    {0.0, 0.0, 0.0},
    {0.0, 0.0, 0.0}
    //Add mais se tiver
};

new Float:SpawnOrg3[][] =
{
    {0.0, 0.0, 0.0},
    {0.0, 0.0, 0.0},
    {0.0, 0.0, 0.0},
    {0.0, 0.0, 0.0},
    {0.0, 0.0, 0.0}
    //Add mais se tiver
};

new PlayerOrg[MAX_PLAYERS]; // Variбvel da Org (adapte а sua)

public OnPlayerSpawn(playerid)
{
    switch(PlayerOrg[playerid])
    {
        case 0:
        {
            new rnd = random(sizeof SpawnOrg1);
           
            SetPlayerPos(playerid, SpawnOrg1[rnd][0], SpawnOrg1[rnd][1], SpawnOrg1[rnd][2]);
        }
       
        case 1:
        {
            new rnd = random(sizeof SpawnOrg2);
           
            SetPlayerPos(playerid, SpawnOrg2[rnd][0], SpawnOrg2[rnd][1], SpawnOrg2[rnd][2]);
        }
       
        case 2:
        {
            new rnd = random(sizeof SpawnOrg3);
           
            SetPlayerPos(playerid, SpawnOrg3[rnd][0], SpawnOrg3[rnd][1], SpawnOrg3[rnd][2]);
        }
        //Add mais se tiver
    }
    return true;
}
Obrigado XD
Reply


Messages In This Thread
Spawn Gangs - by RazorSharpz - 27.01.2017, 12:37
Re: Spawn Gangs - by G4M30V3R - 27.01.2017, 12:45
Re: Spawn Gangs - by RazorSharpz - 27.01.2017, 12:57

Forum Jump:


Users browsing this thread: 1 Guest(s)