10.05.2013, 11:49
How to save player pos....
Spawn only pls
Quote:
public OnPlayerDisconnect(playerid, reason) { new Float, Float:y, Float:z; new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Cash",GetPlayerMoney(playerid)) ; INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]); INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]); INI_WriteInt(File,"Gang",PlayerInfo[playerid][pGang]); INI_WriteInt(File,"Skin", GetPlayerSkin(playerid)); INI_WriteInt(File,"Score", GetPlayerScore(playerid)); INI_WriteInt(File,"Spawn", GetPlayerPos(playerid, x, y, z)); INI_Close(File); return 1; } |
Quote:
forward LoadUser_data(playerid,name[],value[]); public LoadUser_data(playerid,name[],value[]) { INI_Int("Password",PlayerInfo[playerid][pPass]); INI_Int("Cash",PlayerInfo[playerid][pCash]); INI_Int("Kills",PlayerInfo[playerid][pKills]); INI_Int("Deaths",PlayerInfo[playerid][pDeaths]); INI_Int("Gang",PlayerInfo[playerid][pGang]); INI_Int("Score",PlayerInfo[playerid][pScore]); INI_Int("Skin",PlayerInfo[playerid][pChar]); INI_Int("Spawn",PlayerInfo[playerid][pSpawn]); return 1; } |