22.12.2010, 05:43
What is wrong with this script.....all it does is create a .ini file called pos.ini and puts in it pos=0
Код:
public OnPlayerDisconnect(playerid, reason) { new file[128], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), "\\Positions\\%s.ini", pname);//leader the name of your folder in scriptfiles if(!dini_Exists(file)) dini_Create(file); new Float:x, Float:y, Float:z; dini_IntSet(file, "Pos", GetPlayerPos(playerid, x, y, z)); return 1; } public OnPlayerSpawn(playerid) { new file[128], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), "\\Positions\\%s.ini", pname);//leader the name of your folder in scriptfiles SetPlayerPos(playerid, dini_Int(file, "Pos")); return 1; }