Saving level?
#1

Why every time i connect the level go to 0? i change it to 3

This is the script

Quote:

public OnPlayerConnect(playerid)
{

new string[200];
format(string, sizeof(string), " Welcome Back %s Your Vip Level is: %d", PlayerName(playerid), Vip[playerid] );
SendClientMessage(playerid ,COLOR_RED, string);
tune[playerid] = 0;
asked1[playerid] = 0;
asked[playerid] = 0;
ship[playerid] = 0;
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"VIP");
INI_Close(File);
return 1;
}


public OnPlayerDisconnect(playerid, reason)
{
if(IsBeingSpeced[playerid] == 1)
{
foreach(Player,i)
{
if(spectatorid[i] == playerid)
{
TogglePlayerSpectating(i,false);
}
}
}
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"VIP",Vip[playerid]);
INI_Close(File);
if(IsPlayerConnected(playerid)) {
IsLogged[playerid] = false;
}
return 1;
}
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("VIP",PlayerInfo[playerid][pVIP]);
return 1;
}
stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playernam e));
format(string,sizeof(string),PATH,playername);
return string;
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)