/setlevel problem
#1

Hello SA:MP!I have another problem...I start to use BUD(Blasing User Databse) as result,I start an Admin Script!
And I have a problem with commands witch need to make changes in Database...
CODE is under...
P.S:Ignore the Romanian text,I need only to fix this code :
PHP код:
CMD:setlevel(playerid,params[])
{
    new 
givedplayerid,level,s0[128];
    new 
iUID BUD::GetNameUID(GetName(givedplayerid));
    if(
sscanf(params,"id",givedplayerid,level)) return SendClientMessage(playerid,0xFF0000FF,"Utilizare comanda:/setlevel <Playerid> <Level>");
    if(
level || level 10) return SendClientMessage(playerid,0xFF0000FF,"Level invalid!Te rugam sa alegi un level cuprins intre 0 si 50!");
    if(!
IsPlayerConnected(givedplayerid)) return SendClientMessage(playerid,0xFF0000FF,"Acest jucator nu este conectat!");
    if(
PInfo[playerid][Admin] < & !IsPlayerAdmin(playerid))
    {
    
SendClientMessage(playerid,0xFF0000FF,"Ai un level prea mic pentru a utiliza aceasta comanda!");
    }
    
PlayerPlaySound(playerid,1057,0,0,0);
    
PlayerPlaySound(givedplayerid,1057,0,0,0);
    
PInfo[givedplayerid][Admin] = level;
    
BUD::SetIntEntry(iUID,"Admin",level);
    
format(s0,sizeof(s0),"{FF0000}Royal {FF8800}Stunt {00FF00}Gaming {FFFFFF}AdmCmd:Admin %s[ID:%d] a setat levelul playerului %s[ID:%d] la %d!",GetName(playerid),playerid,GetName(givedplayerid),givedplayerid,level);
    
SendClientMessage(playerid,-1,"{FF0000}Royal {FF8800}Stunt {00FF00}Gaming {FFFFFF}AdmCmd:Comanda a fost executata cu succes!");
    return 
1;

Now let explain the problem:In game,and on /stats command,appear I have level 5!But,when I look in DB,appear I have level 10(10 because I put him from DB),but,In Game,doesn't work!Please help me!
Thanks
Reply
#2

Its all right.
Thats your Stats problem.
Show that.
Reply
#3

That's the /stats command:
PHP код:
CMD:stats(playerid,params[])
{
    new 
givedplayerid;
    if(
sscanf(params,"i",givedplayerid)) return SendClientMessage(playerid,0xFF0000FF,"Utilizare comanda:/stats <Playerid>");
    if(!
IsPlayerConnected(givedplayerid)) return SendClientMessage(playerid,0xFF0000FF,"Eroare:Acest player nu este conectat!");
    
format(result,sizeof(result),"*Nume : %s \n*Admin : %d \n*VIP : %d \n*Cash : %d \n*Score : %d \n*Muted : %d \n*Warns : %d",GetName(givedplayerid),PInfo[givedplayerid][Admin],PInfo[givedplayerid][VIP],PInfo[givedplayerid][Cash],PInfo[givedplayerid][Score],PInfo[givedplayerid][Muted],PInfo[playerid][Warns]);
    
ShowPlayerDialog(playerid,Stats,DIALOG_STYLE_MSGBOX,"Stats",result,"Ok","");
    return 
1;

And that is the /mystats command:
PHP код:
CMD:mystats(playerid)
{
    
format(result,sizeof(result),"*Nume : %s \n*Admin : %d \n*VIP : %d \n*Cash : %d \n*Score : %d \n*Muted : %d \n*Warns : %d",GetName(playerid),PInfo[playerid][Admin],PInfo[playerid][VIP],PInfo[playerid][Cash],PInfo[playerid][Score],PInfo[playerid][Muted],PInfo[playerid][Warns]);
    
ShowPlayerDialog(playerid,Mystats,DIALOG_STYLE_MSGBOX,"Statisticile mele",result,"Ok","");
    return 
1;

I need yours help
P.S:tx for /setlevel
Reply
#4

hmm, Thats also Ok.
dude, Do these for a test :-
*Create a New account.
*Register.
*open scriptfiles > see that .ini (What admin level it have ?)
*Rcon login in-game.
*/setlevel to 10
*open scriptfiles folder again and see again.
*if its ok, relog with that account.
*do /mystats and tell if its ok or not.
Reply
#5

1.I don't have .ini files
2.I will come with an edit
EDIT:It doesn't work (
Reply
#6

If you don't have .ini files, go download it.

Good luck
Reply
#7

I don't understand...I have BUD::...It use SQL...HOW TO HAVE INI FILES
Reply
#8

bump...
Reply
#9

Bump....Come one guys....
Reply
#10

UP!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)