Error's
#5

my whole code is
pawn Code:
public OnPlayerConnect(playerid)
{
new pName[MAX_PLAYER_NAME], file[64];
GetPlayerName(playerid, pName, sizeof(pName));
format(file, sizeof(file), "Players/%s.ini", pName);
if(!dini_Exists(file)) gTeam[playerid] = TEAM_CIV;
else gTeam[playerid] = dini_Int(file, "Teams");
wanted = dini_Int(file, "Wanted");
positionx = dini_Int(file, "PositionX");
positiony = dini_Int(file, "PositionY");
positionz = dini_Int(file, "PositionZ");
skin = dini_Int(file, "skin");

public OnPlayerDisconnect(playerid, reason)
{
new Float:x;
new Float:y;
new Float:z;

GetPlayerPos(playerid,x,y,z);
skin = GetPlayerSkin(playerid);
positionx = x;
positiony = y;
positionz = z;

wanted = GetPlayerWantedLevel(playerid);
new pName[MAX_PLAYER_NAME], file[64];
GetPlayerName(playerid, pName, sizeof(pName));
format(file, sizeof(file), "Players/%s.ini", pName);
if(!dini_Exists(file)) dini_Create(file);
dini_IntSet(file, "Teams", gTeam[playerid]);
dini_IntSet(file, "Wanted",wanted);
dini_IntSet(file, "PositionX", floatround(positionx));
dini_IntSet(file, "PositionY", floatround(positiony));
dini_IntSet(file, "PositionZ", floatround(positionz));
dini_IntSet(file, "Skin", (skin));

return 1;
}

public OnPlayerSpawn(playerid)
{
if (!dini_Exists(file)) {
SetPlayerPos(playerid,1647.1093,-2308.5242,14.5156);
}
else
{
SetPlayerPos(playerid, positionx,positiony,positionz);
SetPlayerSkin(playerid,skin);
}
return 1;
}
i dont know if its right
Reply


Messages In This Thread
Error's - by ZBits - 18.07.2012, 03:30
Re: Error's - by ViniBorn - 18.07.2012, 03:32
Re: Error's - by ZBits - 18.07.2012, 03:33
Re: Error's - by ViniBorn - 18.07.2012, 03:34
Re: Error's - by ZBits - 18.07.2012, 03:40
Re: Error's - by ZBits - 18.07.2012, 03:46
Re: Error's - by Larceny - 18.07.2012, 03:51
Re: Error's - by ZBits - 18.07.2012, 03:56
Re: Error's - by Larceny - 18.07.2012, 03:58
Re: Error's - by ZBits - 18.07.2012, 04:03
Re: Error's - by Larceny - 18.07.2012, 04:12
Re: Error's - by ZBits - 18.07.2012, 04:49
Re: Error's - by ZBits - 18.07.2012, 05:52
Re: Error's - by Andi_Evandy - 18.07.2012, 06:42
Re: Error's - by ZBits - 18.07.2012, 14:07
Re: Error's - by Andi_Evandy - 18.07.2012, 14:56
Re: Error's - by XStormiest - 18.07.2012, 15:13
Re: Error's - by ZBits - 18.07.2012, 15:34
Re: Error's - by XStormiest - 18.07.2012, 15:49
Re: Error's - by ZBits - 18.07.2012, 15:55

Forum Jump:


Users browsing this thread: 2 Guest(s)