21.05.2013, 15:53
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 :
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
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 < 0 || 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] < 5 & !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;
}
Thanks