02.04.2013, 00:46
So, since Smash 'em up derby shut down, I am trying to make a re-make of that gamemode, as best as I can. I am kind of in the beginning stages at the moment. I have one question at the moment. Thus far I have 1 arena, but obviously I will have many arenas at the end, but I want to make it easy like using a function liked
which will simply re-spawn all the cars in that arena, respawn the exploding barrels, and put the players in a car. The problem I am having right now is defining the cars. I have to define each car like so
And then on StartArena(); it would place the players in the corrisponding car (via playerid)
And having up to 20 cars per arena, and many arenas, you can see where my problem is. there must be a better way then to go write out each car/arena combination.
pawn Код:
StartArena(#arena number);
pawn Код:
new
arena_1_car1,
arena_1_car2,
arena_1_car3,
arena_1_car4; //etc. etc.
pawn Код:
OnGameModeInit()
{
//---------------------------------------------------------------ARENAS
//---------------------------------------------------------------ARENA 1
//arena parts
CreateObject(10394,3087.3999000,1427.6999500,22.9000000,0.0000000,0.0000000,0.0000000); //arena1
//arena cars
arena_1_car1 = AddStaticVehicle(541,3108.8999000,1449.8000500,20.9000000,90.0000000,48,79); //arena_1_car1
arena_1_car2 = AddStaticVehicle(541,3066.5000000,1449.5000000,20.9000000,270.0000000,48,79); //arena_1_car2
arena_1_car3 = AddStaticVehicle(541,3066.3999000,1415.1999500,20.9000000,270.0000000,48,79); //arena_1_car3
arena_1_car4 = AddStaticVehicle(541,3109.0996100,1416.8994100,20.9000000,90.0000000,48,79); //arena_1_car4
//arena barrels
CreateObject(1225,3099.3000500,1427.0000000,20.6000000,0.0000000,0.0000000,0.0000000); //arena_1_barrel1
CreateObject(1225,3099.1999500,1442.5000000,20.6000000,0.0000000,0.0000000,0.0000000); //arena_1_barrel2
CreateObject(1225,3079.5000000,1427.1992200,20.6000000,0.0000000,0.0000000,0.0000000); //arena_1_barrel3
CreateObject(1225,3078.2998000,1443.8994100,20.6000000,0.0000000,0.0000000,0.0000000); //arena_1_barrel4
//---------------------------------------------------------------ARENAS
}
And having up to 20 cars per arena, and many arenas, you can see where my problem is. there must be a better way then to go write out each car/arena combination.