03.03.2011, 14:32
If i spawn in game for first time then i will fall to the 0 cordinade but save pos are working fine. I just need to know how can i make that if player spawns first time then he spawn pos will be something els (example "2087.1606,1683.9849,10.8203") and after playing and disconnecting he will be able to spawn place where he left before.
I tryed to make new enum that after player disconnects it will set pFirstTime = 1; and saves it, after player reconnects and spawns it will check if pFirstTime == 1; to set saved pos but that didnt work :S it gave error...
EDIT:
Nvm got it work, i made this:
But now when i reconnect it continues with CJ skin :S
I tryed to make new enum that after player disconnects it will set pFirstTime = 1; and saves it, after player reconnects and spawns it will check if pFirstTime == 1; to set saved pos but that didnt work :S it gave error...
EDIT:
Nvm got it work, i made this:
pawn Код:
if(gPlayerLogged[playerid] == 1)
{
if(file, "FirstTime", PlayerInfo[playerid][pFirstTime] == 1)
{
x = dini_Float(file, "posX");
y = dini_Float(file, "posY");
z = dini_Float(file, "posZ");
SetPlayerPos(playerid, x, y, z);
}
}