[Help]Wanted Level Not Load + Score
#1

Hello Guys
im Use y_ini
My Problems im off
and my in Data
Quote:

Score = 2

and wanted
Quote:

Wanted = 6

When im Back To Join And Login After That i Dont Have The 2 Score And 6 Wanted Why
im in Server > im goto see in my data i see
Quote:

Score = 2

Quote:

Wanted = 6

why its not load ?
PHP код:
forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Score",PlayerInfo[playerid][pScore]);
    
INI_Int("Wanted",PlayerInfo[playerid][pWanted]);
    return 
1;

please help +rep
Reply
#2

You have to give the player score with the function on login. Your wanted level is saved in your variable.
Reply
#3

Quote:

if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE" Type your password below to login.","Login","Quit");
}

no
ok now what i put ?
Reply
#4

how to make it in login to load ?
Reply
#5

where u ?
Reply
#6

You need to add these to your login dialog, once the player has correctly typed his password.
pawn Код:
SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWanted]);
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
Reply
#7

sorry i want know pKills
And pDeaths
how to get player death and kill ?

i rep u now dude
Reply
#8

help
Reply
#9

Post your code OnPlayerConnect
Reply
#10

Just add the score and wanted functions inside your loading function like this.
Then they are automatically set when the data is loaded and you don't have code spread all over the place that actually belongs together.

pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Score",PlayerInfo[playerid][pScore]);
    INI_Int("Wanted",PlayerInfo[playerid][pWanted]);

    SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWanted]);
    SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);

    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)