[Help]Last Position - Spawn
#5

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:
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;
}
probebly I did something wrong, but where :S

---
edit again xD
let me try your edit
Reply


Messages In This Thread
[Help]Last Position - Spawn - by igal4576 - 12.08.2010, 23:56
Re: [Help]Last Position - Spawn - by iggy1 - 13.08.2010, 00:06
Re: [Help]Last Position - Spawn - by igal4576 - 13.08.2010, 00:16
Re: [Help]Last Position - Spawn - by iggy1 - 13.08.2010, 00:27
Re: [Help]Last Position - Spawn - by igal4576 - 13.08.2010, 00:30
Re: [Help]Last Position - Spawn - by iggy1 - 13.08.2010, 01:07
Re: [Help]Last Position - Spawn - by igal4576 - 13.08.2010, 01:12
Re: [Help]Last Position - Spawn - by iggy1 - 13.08.2010, 01:16
Re: [Help]Last Position - Spawn - by igal4576 - 13.08.2010, 01:45
Re: [Help]Last Position - Spawn - by iggy1 - 13.08.2010, 10:34

Forum Jump:


Users browsing this thread: 1 Guest(s)