13.08.2010, 00:30
(
Последний раз редактировалось igal4576; 13.08.2010 в 00:58.
)
wow thank you i'll try it now and edit it if it works/not works I hope it will :P
--------------------------------
Edit:
I try this but no success, no errors or warning but still it doesn't works:
This is the FS:
probebly I did something wrong, but where :S
---
edit again xD
let me try your edit
--------------------------------
Edit:
I try this but no success, no errors or warning but still it doesn't works:
This is the FS:
pawn Код:
#include <a_samp>
#include <djson>
#pragma tabsize 0
#define COLOR_GREEN 0x33AA33AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xFF3366FF
#define Filterscript
#if defined Filterscript
public OnFilterScriptInit()
{
djson_GameModeInit();
return 1;
}
public OnFilterScriptExit()
{
djson_GameModeExit();
return 1;
}
public OnGameModeInit()
{
djson_GameModeInit();
return 1;
}
public OnGameModeExit()
{
djson_GameModeExit();
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
djAutocommit(false);
new Float:x,Float:y,Float:z,fstr[35];
GetPlayerPos(playerid,x,y,z);//put co-ords in variables x,y,z.
format(fstr,35,"%.json",playername(playerid));//file string (players name)
djSetFloat(fstr,"pos/x",x);//save co-ords
djSetFloat(fstr,"pos/y",y);
djSetFloat(fstr,"pos/z",z);
djCommit(fstr);
djAutocommit(false);
return 1;
}
public OnPlayerSpawn(playerid)
{
new fstr[35];
format(fstr,35,"%.json",playername(playerid));
SetPlayerPos(playerid,djFloat(fstr,"pos/x"),djFloat(fstr,"pos/y"),djFloat(fstr,"pos/z"));
return 1;
}
stock playername(playerid)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
return pname;
}
---
edit again xD
let me try your edit