Jump to content

Problema comanda /setpp


Retr0

Recommended Posts

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;
}

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.