08.02.2011, 09:54
So i want to load i.e Civilian spawn location from my djson file.
Everyone knows what this code do, right?
My prob starts here:
It spawns me in the middle of San Andreas... [0.0, 0.0, 0.0], while i made player spawn in LV...
What should i do? I think it doesn't read anything correctly from my djson file...
pawn Код:
enum Positions
{
Float:pCivilianSpawnX,
Float:pCivilianSpawnY,
Float:pCivilianSpawnZ,
pCivilianSpawnInterior
};
new PositionInfo[Positions];
public LoadPositions()
{
PositionInfo[pCivilianSpawnX] = djFloat(POSITIONS_FILE, "Civilian/SpawnX");
PositionInfo[pCivilianSpawnY] = djFloat(POSITIONS_FILE, "Civilian/SpawnX");
PositionInfo[pCivilianSpawnZ] = djFloat(POSITIONS_FILE, "Civilian/SpawnX");
PositionInfo[pCivilianSpawnInterior] = djInt(POSITIONS_FILE, "Civilian/SpawnInterior");
return 1;
}
My prob starts here:
pawn Код:
SetPlayerPos(playerid, PositionInfo[pCivilianSpawnX], PositionInfo[pCivilianSpawnY], PositionInfo[pCivilianSpawnZ]);
SetPlayerInterior(playerid, PositionInfo[pCivilianSpawnInterior]);
What should i do? I think it doesn't read anything correctly from my djson file...