Saving Admin Level..
#1

Tittle says it all...well i have make an /setadmin command
here is the enumeration i use

pawn Code:
enum iDetails {
    Pass,
    Cash,
    Score,
    Banned,
    AdminLVL
};
now its ok when i use setadmin command it will put this admin level normally.I have made and the database normally but how i can make it so it will automatically put the admin level i had set when player connects?
Reply
#2

It's Enumeration, not enumation and delete the last "," on the AdminLVL.
Just load the User Data and your variable will wear it on it.
For example, PlayerInfo[ playerid ][ AdminLVL ] will wear the level
Reply
#3

pawn Code:
public UserDataLoad_data(playerid,name[],value[]) {
    INI_Int("Pass",pInfo[playerid][Pass]);
    INI_String("IP",pIP[playerid],16);
    INI_Int("Admin",pInfo[playerid][AdminLVL]);
    INI_Int("Cash",pInfo[playerid][Cash]);
    INI_Int("Score",pInfo[playerid][Score]);
    INI_Int("Banned",pInfo[playerid][Banned]);
    return 1;
}
this is what i have
Reply
#4

Correct and after login parseFile the data to the user, unless he type wrong password.
Then the data will be ok. By the way, is the password numeric, because if it's not then use INI_String, not INI_Int.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)