Jump to content

Recommended Posts

Posted

Am o problema cu o comanda.Am admin level 6(Owner pe server) dar imi da eroare ca nu am acces la aceasta comanda.Nu inteleg de ce.Aici aveti liniile de cod aplicate:

       CMD:setpp(playerid, params[])
{
    
    if (PlayerInfo[playerid][pAdmin] >= 6)
    {
        new id,premiump,admname[25],giveplayer[25],strings[64];
        if(sscanf(params, "ud",id,premiump)) return SCM(playerid, COLOR_WHITE, "{FFFFFF}Syntax: {FFFFFF}/setpp <Name/Playerid> <Premium Points>");
        PlayerInfo[id][pPremiumPoints] = premiump;
        Update(id,pPremiumPointsx);
        GetPlayerName(playerid,admname,sizeof(admname));
        GetPlayerName(id,giveplayer,sizeof(giveplayer));
        new string[128],string2[128];
        format(string, sizeof(string), "Admin %s has set your Premium Points to %d.", admname, PlayerInfo[id][pPremiumPoints]);
        SendClientMessage(id, COLOR_LIGHTBLUE, string);
        format(string2, sizeof(string2), "You set %s Premium Points to %d.", giveplayer, PlayerInfo[id][pPremiumPoints]);
        SendClientMessage(playerid, COLOR_LIGHTRED, string2);
        format(strings, sizeof(strings), "AdmCmd: %s used /setpp on %s: %d premium points.",admname, giveplayer, PlayerInfo[id][pPremiumPoints]);
        ABroadCast(COLOR_YELLOW,strings,6);
    }
    return 1;
}
CMD:setppo(playerid, params[])
{
    
    if(IsPlayerConnected(playerid))
     {
        if (PlayerInfo[playerid][pAdmin] >= 6)
       {
        new id[25],cont,premiump,strings[64],admname[25];
        if(sscanf(params, "s[25]i",id,premiump)) return SCM(playerid,COLOR_WHITE,"{FFFFFF}Syntax: {FFFFFF}/setppo <Name> <Premium Points>");
        cont = MySQLCheckAccount(id);
        if(cont == 0) return SCM(playerid,COLOR_WHITE,"{FFB870}This name does not exist.");
        new str1[128];
        mysql_format(SQL,str1,sizeof(str1),"UPDATE users SET `PremiumPoints`='%d' WHERE `name`='%s'",premiump,id);
        mysql_tquery(SQL,str1,"","");
        format(strings, sizeof(strings), "AdmCmd: %s used /setppo on %s: %d premium points.",admname, cont, premiump);
        ABroadCast(COLOR_YELLOW,strings,6);
        }
    }
    return 1;
}

Posted
On 06.12.2016 at 0:21 PM, Retr0 said:

up

 

up

Poate nu ai gradul de admin 6 sau mai mare.

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.