Jump to content
  • 0

O problema va rog ajutor


JilavaXXL

Question

Deci am luat de pe net un sistem de admin care continea si sistem de inregistrare/logare..el salveaza levelul de admin ,de vip,banii,scorul,kilurile,,mortile,si parola..dar nu stiu cum sa adaug sa salveze si orele si minutele :( care ma poate ajuta ???

si in pawno arata asa [pawn]enum PlayerInfo

{

    Pass[129],

    Adminlevel,

    VIPlevel,

    Money,

    Scores,

    Kills,

    Deaths,

}

forward loadaccount_user(playerid, name[], value[]);

public loadaccount_user(playerid, name[], value[])

{

    INI_String("Password", pInfo[playerid][Pass],129);

    INI_Int("AdminLevel",pInfo[playerid][Adminlevel]);

    INI_Int("VIPLevel",pInfo[playerid][VIPlevel]);

    INI_Int("Money",pInfo[playerid][Money]);

    INI_Int("Scores",pInfo[playerid][scores]);

    INI_Int("Kills",pInfo[playerid][Kills]);

    INI_Int("Deaths",pInfo[playerid][Deaths]);

    return 1;

}

public OnPlayerDisconnect(playerid, reason)

{

    new INI:file = INI_Open(Path(playerid));

    INI_SetTag(file,"Player's Data");

    INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]);

    INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]);

    INI_WriteInt(file,"Money",GetPlayerMoney(playerid));

    INI_WriteInt(file,"Scores",GetPlayerScore(playerid));

    INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);

    INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);

    INI_Close(file);

    new

    string[64],

    name[MAX_PLAYER_NAME];

    GetPlayerName(playerid,name,MAX_PLAYER_NAME);

    switch(reason)

    {

        case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);

        case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);

        case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);

    }

    SendClientMessageToAll(COLOR_CYAN,string);

return 1;

}

[/pawn]

Nu stiu daca am ratat ceva...da oricum merge perfect..vreau sa stiu doar cum sa adaug sa salveze orele si minutele  :grin:

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.