CMD:set(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] < 4)return SCM(playerid, -1, AdminOnly);
extract params -> new player:id, string:item[15], ammount; else {
SendClientMessage(playerid, COLOR_GREY,"Syntaxl: /set <id> <item> <ammount> ");
return SendClientMessage(playerid, COLOR_GREY, "Avabile Items: Group, Rank, Money, BankMoney, PlayedHours, PremiumPoints, PremiumAccount, FP");
}
switch(YHash(item, false)) {
case _I<rank>: {
PlayerInfo[id][pRank] = ammount;
SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s i-a setat lui %s rank-ul in factiune la rank %d.", 1, GetName(playerid), GetName(id), ammount)
SendClientMessage(id, -1, "Your rank in this faction has been changed.");
mysql_format(SQL, str, sizeof(str), "UPDATE users SET `Rank`='%d' WHERE `name`='%s'",PlayerInfo[id][pRank],PlayerInfo[id][pNormalName]);
mysql_tquery(SQL, str, "", "");
}
case _I<group>: {
switch(ammount) {
case 0: return SendClientMessage(playerid, COLOR_GREY, "Foloseste /auninvite");
case 1: ftext = "Los Santos Police Departament";
case 2: ftext = "Federal Bureau Of Investigation";
case 3: ftext = "National Guard";
case 4: ftext = "Los Aztecas";
case 5: ftext = "Grove Street";
case 6: ftext = "Los Vagos";
case 7: return SendClientMessage(playerid, -1, "Invalid faction ID");
case 8: ftext = "Las Venturas Police Departament";
case 9: ftext = "News Reporter";
case 10: ftext = "Ballas";
case 11: ftext = "Hitman Agency";
case 12: return SendClientMessage(playerid, -1, "Invalid faction ID");
case 13: ftext = "Taxi Los Santos";
case 14: ftext = "Las Venturas Paramedic Departament";
case 15: ftext = "The Rifa";
case 16: ftext = "The Russian Mafia";
case 17: ftext = "Taxi LV";
}
PlayerInfo[id][pMember] = ammount;
va_SendClientMessage(id, COLOR_DBLUE, "Administratorul %s te-a adaugat ca membru in factiunea %s",name,ftext);
SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s l-a adaugat ca membru pe %s in factiunea %s", 1, name, name2, ftext);
mysql_format(gQuery, sizeof(gQuery),"UPDATE users SET `Member`='%d' WHERE `name`='%s'",PlayerInfo[id][pMember],PlayerInfo[id][pRank],PlayerInfo[id][pNormalName]);
mysql_tquery(SQL, gQuery, "", "");
}
case _I<money>: {
PlayerInfo[id][pCash] = ammount;
GivePlayerCash(id, ammount); Update(id, pCashx);
SendClientMessage(id, -1, "You recived some money.");
SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s i-a setat lui %s bani in mana la suma de %d.", 1, AdminName, IDName, ammount);
}
case _I<premiumpoints>: {
PlayerInfo[id][pPremiumPoints] = ammount;
Update(id,pPremiumPointsx);
SendClientMessage(id, -1, "Your recived some premium points.");
SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s i-a setat lui %s punctele premium la %d.", 1, AdminName, IDName, ammount);
}
case _I<bankmoney>: {
PlayerInfo[id][pAccount] = ammount;
Update(id, pBank);
SendClientMessage(id, -1, "Your recived some money in bank.");
SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s i-a setat lui %s bani in banca la suma de %d.", 1, AdminName, IDName, ammount);
}
case _I<playedhours>: {
PlayerInfo[id][pConnectTime] = ammount;
Update(id,pConnectTimex);
SendClientMessage(id, -1, "Your played hours has been changed.");
SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s i-a setat lui %s orele jucate la %d.", 1, AdminName, IDName, ammount);
}
case _I<premiumaccount>: {
if(!(0 <= ammount <= 1)) return SendClientMessage(playerid, COLOR_GREY, "1 = Cont premium | 0 = Fara cont premium");
if(ammount == 0) return SendClientMessage(id, -1, "Your premium account has been removed.");
if(ammount == 1) return SendClientMessage(id, -1, "You recived a premium account .");
PlayerInfo[id][pPremiumAccount] = ammount;
Update(id, pPremiumAccountx);
}
case _I<factionpunish>: {
PlayerInfo[id][pFpunish] = ammount;
Update(id,pFpunishx);
SendClientMessage(id, -1, "Your FP has been changed.");
SendAdminMessage(COLOR_LIGHTRED, "AdmWarning: %s i-a setat lui %s Faction Punish-ul la %d.", 1, AdminName, IDName, ammount);
}
default: return SendClientMessage(playerid, COLOR_GREY, "Avabile Items: Group, Rank, Money, BankMoney, PlayedHours, PremiumPoints, PremiumAccount, FP");
}
return true;
}
cv facut rapid, n am stat sa rezolv erorile de la Mesaje faceti voi ca sunteti developeri