Premium Account
#1

hello guys, i want to make dialog to can players buy premium account but i faild
I take from command /setpremium and put on dialog but i take errors " warning 217: loose indentation"
this is the command:
PHP код:
CMD:setpremium(playerid,params[])
{
    if(
gPlayerLogged[playerid] == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"Trebuie sa te loghezi mai intai.");
    if (
PlayerInfo[playerid][pAdmin] < 5) return SCM(playerid,COLOR_WHITE,AdminOnly);
    new 
id,sendername[25],string[128];
    if(
sscanf(params"u",id)) return SCM(playeridCOLOR_WHITE"{B8DBFF}USE: /setpremium <Name/Playerid>");
    if(
PlayerInfo[id][pPremiumAccount] == 1) return SCM(playerid,COLOR_LIGHTRED"Error:{FFFFFF} Acest player detine cont premium.");
    
PlayerInfo[id][pPremiumAccount] = 1;
    
GetPlayerName(playeridsendernamesizeof(sendername));
    
format(stringsizeof(string), "Admin %s a setat cont-ul dvs. Premium.",sendername);
    
SCM(playerid,COLOR_LIGHTRED,string);
    
GetPlayerName(id,sendername,sizeof(sendername));
    
format(stringsizeof(string), "UPDATE users SET `Premium`='1' WHERE `name`='%s'",sendername);
    
mysql_query(SQL,string);
    return 
1;

and this is dialog
PHP код:
if(response)
        {
            if(
listitem == 0)
            {
                if(
PlayerInfo[playerid][pHPoints] <1500) return SCM(playerid,-1,"{37B9C8}You don't have 1500 PremiumPoints.");//premium
                
PlayerInfo[playerid][pHPoints] -= 1500;
                
//GivePlayerCash(playerid,15000);
                //Update(playerid,pCashx);
                //Update(playerid,pHPointsx);
                
new id,sendername[25],string[128];
                if(
PlayerInfo[id][pPremiumAccount] == 1) return SCM(playerid,COLOR_LIGHTRED"Error:{FFFFFF}Ai cont preimum.");
                
PlayerInfo[id][pPremiumAccount] = 1;
                
GetPlayerName(id,sendername,sizeof(sendername));
                
format(stringsizeof(string), "UPDATE users SET `Premium`='1' WHERE `name`='%s'",sendername);
                
mysql_query(SQL,string);
                
SCM(playerid,-1,"{33CCFF}Felicitari ai cumparat cont premium.");
            } 
Reply


Messages In This Thread
Premium Account - by Sn4ke2 - 08.06.2015, 20:36
Re: Premium Account - by DarkLored - 08.06.2015, 20:44
Re: Premium Account - by Sn4ke2 - 08.06.2015, 20:53
Re: Premium Account - by DarkLored - 08.06.2015, 20:55
Re: Premium Account - by Sn4ke2 - 08.06.2015, 21:36
Re: Premium Account - by Sn4ke2 - 09.06.2015, 08:58
Re: Premium Account - by JaydenJason - 09.06.2015, 09:06
Re: Premium Account - by mamorunl - 09.06.2015, 09:06
Re: Premium Account - by Sn4ke2 - 09.06.2015, 09:18
Re: Premium Account - by mamorunl - 09.06.2015, 09:20

Forum Jump:


Users browsing this thread: 1 Guest(s)