09.06.2015, 09:06
Код:
CMD:setpremium(playerid,params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi mai intai."); if (PlayerInfo[playerid][pAdmin] < 5) return SCM(playerid,COLOR_WHITE,AdminOnly); new id,sendernamee[25],stringg[128]; if(sscanf(params, "u",id)) return SCM(playerid, COLOR_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(playerid, sendernamee, sizeof(sendernamee)); format(stringg, sizeof(stringg), "Admin %s a setat cont-ul dvs. Premium.",sendernamee); SCM(playerid,COLOR_LIGHTRED,stringg); GetPlayerName(id,sendernamee,sizeof(sendernamee)); format(stringg, sizeof(stringg), "UPDATE users SET `Premium`='1' WHERE `name`='%s'",sendernamee); mysql_query(SQL,stringg); return 1; } // 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,sendernamee[25],string[128]; if(PlayerInfo[id][pPremiumAccount] == 1) return SCM(playerid,COLOR_LIGHTRED, "Error:{FFFFFF}Ai cont preimum."); PlayerInfo[id][pPremiumAccount] = 1; GetPlayerName(id,sendernamee,sizeof(sendernamee)); format(string, sizeof(string), "UPDATE users SET `Premium`='1' WHERE `name`='%s'",sendernamee); mysql_query(SQL,string); SCM(playerid,-1,"{33CCFF}Felicitari ai cumparat cont premium."); }