#include <a_samp>
#include <dini>
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" SavePos Filterscript");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new file[128], pname[MAX_PLAYER_NAME];
new Float:x, Float:y, Float:z;
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "\\SavePos\\%s.ini", pname);
if(!dini_Exists(file))
dini_Create(file);
GetPlayerPos(playerid, x, y, z);
dini_FloatSet(file, "posX", x);
dini_FloatSet(file, "posY", y);
dini_FloatSet(file, "posZ", z);
return 1;
}
public OnPlayerSpawn(playerid)
{
new file[128], pname[MAX_PLAYER_NAME];
new Float:x, Float:y, Float:z;
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "\\SavePos\\%s.ini", pname);
x = dini_Float(file, "posX");
y = dini_Float(file, "posY");
z = dini_Float(file, "posZ");
SetPlayerPos(playerid, x, y, z);
return 1;
}
x = dini_Float(file, "posX");
y = dini_Float(file, "posY");
z = dini_Float(file, "posZ");
if (x==0.0 && y==0.0 && x==0.0)
{
SetPlayerPos(playerid, 2229.0200,-1159.7896,25.7981,90.0000);
}
else
{
SetPlayerPos(playerid, x, y, z);
}
SetPlayerPostionOnSpawn: {Playerid}{2229.0200,-1159.7896,25.7981,90.0000};
pawn Код:
|
thats not even a function in samp!!! and you could never call a function with that syntax.,
(atleast not without some fancy marco) you need to re-read the topic if your gonna try to help, |