23.02.2012, 07:42
well to save and load the objects is not really a simple job.
but the first thing you wil have to do is:
this is not a good example becouse you need the X,Y,Z but i cant explain it better on my phone :X
also you will need to loob throught all the slots to see if its empty so u can save the obj id on it.
Why you need the variable?
well if you will want to remove the objects in game two i would say that you can just point to an Slot and it will destroy its ID
but the first thing you wil have to do is:
pawn Code:
//create a variable with the MAX_OBJECTS , the maximum objects you want
new PlayerObject[MAX_PLAYERS][MAX_OBJECTS];
//Then with every single object yo create save its Id with the variable.
new Obj = CreateObject(playerid,//so on...
PlayerObject[playerid][1]= Obj;//this will be saved in the first slot ID
also you will need to loob throught all the slots to see if its empty so u can save the obj id on it.
Why you need the variable?
well if you will want to remove the objects in game two i would say that you can just point to an Slot and it will destroy its ID