Random spawns for civs - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Random spawns for civs (
/showthread.php?tid=418699)
Random spawns for civs -
Goldino - 25.02.2013
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
Re: Random spawns for civs -
LarzI - 25.02.2013
pawn Код:
if( gTeam[ playerid ] == TEAM_CIV )
{
// random spawns here
}
Quite simple, really.
Re: Random spawns for civs -
Goldino - 25.02.2013
EDIT: I've fixed it. Thanks for your help
Re: Random spawns for civs - Patrick - 25.02.2013
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
}
}