Random spawns for civs
#1

I'm working on Random spawns. But I have a problem, it randomly spawns every skin. I would only like random spawns for civilians only. How can I make it only for civilians. I already have all my skins defined, all teams. And I have my teams already made. Here is what I mean:

pawn Код:
new gTeam[ MAX_PLAYERS ];

//Colors for teams and team names defined
Here is my civ name:

TEAM_CIV

So yes, how do I make random spawns for civilians only?

Thanks
Reply
#2

pawn Код:
if( gTeam[ playerid ] == TEAM_CIV )
{
    // random spawns here
}
Quite simple, really.
Reply
#3

EDIT: I've fixed it. Thanks for your help
Reply
#4

You DONT need to put ; at the end of a bracket!

Try this
pawn Код:
new Float:RandomSpawns[][] =
{
    if( gTeam[ playerid ] == TEAM_CIV )
    {
        {1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
        {1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
        {1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
        {718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
        {722.3772, -1477.2856, 5.4688, 272.3814} // Randomspawn
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)