[pawn]public OnPlayerDisconnect(playerid, reason)
{
if(GetPos(playerid)) return 0;
SetNew(playerid,1);
return 1;
}[/pawn]
[pawn]public OnPlayerSpawn(playerid,classid,teamid)
{
new gpX = dini_Int( file, "PosX" ), gpY = dini_Int( file, "PosY" ), gpZ = dini_Int( file, "PosZ" );
if(GetNew(playerid) == 1) {
SetPlayerPos(playerid,gpX,gpY,gpZ,0,0);
}
if(GetNew(playerid) == 0) {
}
return 1;
}[/pawn]
public GetNew(playerid)
{
format(MSN,256, REGISTERS, gPlayers[playerid]);
new n; n = dini_Int(MSN,"New");
return n;
}
public SetNew(playerid,Monto)
{
format(MSN,256, REGISTERS, gPlayers[playerid]);
dini_IntSet(MSN,"New",Monto);
}
public GetPos(playerid)
{
format(MSN,256, REGISTERS, gPlayers[playerid]);
new Float:gpX,Float:gpY,Float:gpZ,str[256],string[256],sz[256];
GetPlayerPos(playerid,gpX,gpY,gpZ);
format(string,sizeof(string),"%.0f",gpX);
format(str,sizeof(str),"%.0f",gpY);
format(sz,sizeof(sz),"%.0f",gpZ);
dini_Set(MSN, "PosX", string);
dini_Set(MSN, "PosY", str);
dini_Set(MSN, "PosZ", sz);
return 0;
}
Because the player does not appear where it's supposed to appear
is like a bug