23.06.2010, 04:59
Hello, i have a problem i made a position save system with dini
and it saves the position only if your disconnect for the first time
on your new account. So if i /register a new account there is not
a X, Y, Z position in the .ini so i want that the player spawn at airport
but i have a problem here's my script :
So it spawns directly the player with the XYZ coordinates which not is in the
ini on the new account i want to make something like if(!x,t,z exist) { SetPlayerPos(sdnskdjsd)) <<< something like this
but i don't know how please help me
and it saves the position only if your disconnect for the first time
on your new account. So if i /register a new account there is not
a X, Y, Z position in the .ini so i want that the player spawn at airport
but i have a problem here's my script :
Quote:
public OnPlayerSpawn(playerid) { if(IsLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_LRED, "** This server requires a login before spawn. ((Kicked))"); Kick(playerid); return 1; } if(IsLogged[playerid] == 1) { new playername[24]; GetPlayerName(playerid, playername, sizeof(playername)); new file[64]; format(file, sizeof(file), "eSportsGaming/Users/%s.ini", playername); new Float:X, Float:Y, Float:Z; IsLogged[playerid] = 1; SetPlayerMoney(playerid, dini_Int(file, "Cash")); PlayerInfo[playerid][AdminLevel] = dini_Int(file, "AdminLevel"); X = dini_Float(file, "PosX"); Y = dini_Float(file, "PosY"); Z = dini_Float(file, "PosZ"); SetPlayerPos(playerid, X, Y, Z); } return 1; } |
ini on the new account i want to make something like if(!x,t,z exist) { SetPlayerPos(sdnskdjsd)) <<< something like this
but i don't know how please help me