You all are not getting what I'm talking about, I'll try to explain a little better.
Ok, so I have two teams and a GameMode with map system (
Kitten's base GM), that means a new map will load every certain time, now, everything loads as it should, everything is working fine, but for each team there is only one spawn, so all players of the same team spawn on the same spot (which causes bugs sometimes), it looks like this:
Код:
Team1X = -55
Team1Y = -334.89999389648
Team1Z = 7.999998092651
Team2X = -41.299999237061
Team2Y = -224.10000610352
Team2Z = 6.5999999046326
Now, what I want is instead of all those X,Y,Z, is to put random spawns on each .ini and load them. Something like this(could be different, maybe every X on a line, Y on a line, and so on):
Код:
Team1 =
949.8915,2685.2961,10.8203,255.4671
943.4811,2686.7908,10.8203,256.1251
938.1342,2687.9041,10.8203,256.1251
947.5636,2678.0840,10.8203,262.0472
938.7642,2678.1858,10.8203,251.0257
944.9770,2667.5320,10.8203,246.7486
940.6622,2667.4146,10.8203,246.4196
934.8538,2669.0117,11.2036,246.4196
Team2 =
947.5636,2678.0840,10.8203,262.0472
938.7642,2678.1858,10.8203,251.0257
944.9770,2667.5320,10.8203,246.7486
940.6622,2667.4146,10.8203,246.4196
934.8538,2669.0117,11.2036,246.4196
I'm currently loading each X,Y,Z like this:
pawn Код:
if(strcmp(name, "Team1X", true) == 0) Map[Team1X] = floatstr(value);
if(strcmp(name, "Team1Y", true) == 0) Map[Team1Y] = floatstr(value);
if(strcmp(name, "Team1Z", true) == 0) Map[Team1Z] = floatstr(value);
if(strcmp(name, "Team2X", true) == 0) Map[Team2X] = floatstr(value);
if(strcmp(name, "Team2Y", true) == 0) Map[Team2Y] = floatstr(value);
if(strcmp(name, "Team2Z", true) == 0) Map[Team2Z] = floatstr(value);
And using that on OnPlayerSpawn like this:
pawn Код:
SetPlayerPos(playerid,Map[Team1X],Map[Team1Y],Map[Team1Z]);
But what I want is to load all spawns, and use them random OnPlayerSpawn. Any idea? Thanks to everyone that has helped so far
@Ihateyou: I already took a look into that, but that won't work because its used as an include not a file loaded.
@BroZeus: hmm.. I think that's different