• Уважаемый Гость.
    - Прежде чем создать свою тему, пожалуйста, попробуй воспользоваться этим -> ПОИСКОМ !!!
    - После решения Вашего вопроса (проблемы) - нажмите "Лучший ответ", на сообщении, которое его решило. За игнорирование этого действия - Вы получите соответствующее предупреждение. Мы - стараемся Вам помочь. Уделите 10 секунд - чтобы нажать кнопку. (Если у Вас нет такой возможности - укажите в последнем своем сообщении какой ответ Вы считаете лучшим. Наши модераторы сделают это за Вас)
    ЗАПРЕЩЕНО:
    - Cоздавать темы с названиями "Помогите", "Плиз", "Ошибка", "Не могу найти", "Хелп" и тому подобное;
    - Cоздавать темы без детального описания того, что нужно исправить.
    - Cоздавать темы из одного скриншота.
    За игнор правил форума - Ваша тема будет удалена, а Вы получите системное предупреждение.

Проблема с командой

Статус
В этой теме нельзя размещать новые ответы.

DeanMrz

Изучающий
Пользователь
Регистрация
9 Дек 2017
Сообщения
306
Лучшие ответы
0
Репутация
2
Ребят сделал префы цветные все норм в бд код цвета как пример {FF0000} загружает {FF00/0} на месте палочки бывает рандом символ бывало = + /
PHP:
Команда /a

CMD:admin(playerid, params[])
{
	if(PlayerInfo[playerid][pAlcoInvenxua] == 0) return true;
	if(sscanf(params, "s[128]",params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Ââåäèòå: (/a)dmin [òåêñò]");
	if(strlen(PlayerInfo[playerid][pPrefix]) > 1) { 
		format(stringer1, sizeof(stringer1), "{FF0000}[A]{FFFFFF} %s[%d] {%s}%s: %s", PlayerInfo[playerid][pNames], playerid, PlayerInfo[playerid][c_Prefix], PlayerInfo[playerid][pPrefix], params[0]);
	} else {
		format(stringer1, sizeof(stringer1), "[A-%d] %s[%d]: %s", PlayerInfo[playerid][pAlcoInvenxua], PlayerInfo[playerid][pNames], playerid, params[0]);
	}
	SendAdminMessage(0xB8FF1AFF, stringer1);
	return true;
}
Загрузка:

PHP:
publics: LoginCallback(playerid)
{
	new maximum[78];
    cache_get_field_content(0, "pID", maximum),             PlayerInfo[playerid][pID] = strval(maximum);
	cache_get_field_content(0, "pLevel", maximum),			PlayerInfo[playerid][pLevel] = strval(maximum);
	cache_get_field_content(0, "pPhousekey", maximum),		PlayerInfo[playerid][pPhousekey] = strval(maximum);
	cache_get_field_content(0, "pAlcoInvenxua", maximum),	PlayerInfo[playerid][pAlcoInvenxua] = strval(maximum);
	cache_get_field_content(0, "pFuelcar", maximum), 		PlayerInfo[playerid][pFuelcar] = strval(maximum);
	cache_get_field_content(0, "pHeadValue", maximum), 		PlayerInfo[playerid][pHeadValue] = strval(maximum);
	cache_get_field_content(0, "pContract", maximum), 		PlayerInfo[playerid][pContract] = strval(maximum);
	cache_get_field_content(0, "pCar", maximum), 			PlayerInfo[playerid][pCar] = strval(maximum);
	cache_get_field_content(0, "pCar2", maximum), 			PlayerInfo[playerid][pCar2] = strval(maximum);
	cache_get_field_content(0, "pHelper", maximum),			PlayerInfo[playerid][pHelper] = strval(maximum);
	cache_get_field_content(0, "pDonatemoney2", maximum), 	PlayerInfo[playerid][pDonatemoney2] = strval(maximum);
	cache_get_field_content(0, "pDonateRank", maximum), 	PlayerInfo[playerid][pDonateRank] = strval(maximum);
	cache_get_field_content(0, "pSex", maximum), 			PlayerInfo[playerid][pSex] = strval(maximum);
	cache_get_field_content(0, "pMuted", maximum), 			PlayerInfo[playerid][pMuted] = strval(maximum);
	cache_get_field_content(0, "pExp", maximum), 			PlayerInfo[playerid][pExp] = strval(maximum);
	cache_get_field_content(0, "pCash", maximum), 			PlayerInfo[playerid][pCash] = strval(maximum);
	cache_get_field_content(0, "pKills", maximum), 			PlayerInfo[playerid][pKills] = strval(maximum);
	cache_get_field_content(0, "pJailed", maximum), 		PlayerInfo[playerid][pJailed] = strval(maximum);
	cache_get_field_content(0, "pJailTime", maximum), 		PlayerInfo[playerid][pJailTime] = strval(maximum);
	cache_get_field_content(0, "pMats", maximum), 			PlayerInfo[playerid][pMats] = strval(maximum);
	cache_get_field_content(0, "pHeal", maximum), 			PlayerInfo[playerid][pHeal] = strval(maximum);
	cache_get_field_content(0, "pLeader", maximum), 		PlayerInfo[playerid][pLeader] = strval(maximum);
	cache_get_field_content(0, "pMember", maximum), 		PlayerInfo[playerid][pMember] = strval(maximum);
	cache_get_field_content(0, "pRank", maximum), 			PlayerInfo[playerid][pRank] = strval(maximum);
	cache_get_field_content(0, "pJob", maximum), 			PlayerInfo[playerid][pJob] = strval(maximum);
	cache_get_field_content(0, "pVodPrava", maximum), 		PlayerInfo[playerid][pVodPrava] = strval(maximum);
	cache_get_field_content(0, "pFlyLic", maximum), 		PlayerInfo[playerid][pFlyLic] = strval(maximum);
	cache_get_field_content(0, "pBoatLic", maximum), 		PlayerInfo[playerid][pBoatLic] = strval(maximum);
	cache_get_field_content(0, "pFishLic", maximum), 		PlayerInfo[playerid][pFishLic] = strval(maximum);
	cache_get_field_content(0, "pGunLic", maximum), 		PlayerInfo[playerid][pGunLic] = strval(maximum);
	cache_get_field_content(0, "pSDPistol", maximum), 		PlayerInfo[playerid][pSDPistol] = strval(maximum);
	cache_get_field_content(0, "pDesertEagle", maximum), 	PlayerInfo[playerid][pDesertEagle] = strval(maximum);
	cache_get_field_content(0, "pShotGun", maximum), 		PlayerInfo[playerid][pShotGun] = strval(maximum);
	cache_get_field_content(0, "pMP5", maximum), 			PlayerInfo[playerid][pMP5] = strval(maximum);
	cache_get_field_content(0, "pAK47", maximum), 			PlayerInfo[playerid][pAK47] = strval(maximum);
	cache_get_field_content(0, "pM4", maximum), 			PlayerInfo[playerid][pM4] = strval(maximum);
	cache_get_field_content(0, "pChar", maximum), 			PlayerInfo[playerid][pChar] = strval(maximum);
	cache_get_field_content(0, "pModel", maximum), 			PlayerInfo[playerid][pModel] = strval(maximum);
	cache_get_field_content(0, "pPnumber", maximum), 		PlayerInfo[playerid][pPnumber] = strval(maximum);
	cache_get_field_content(0, "pPayDayHad", maximum), 		PlayerInfo[playerid][pPayDayHad] = strval(maximum);
	cache_get_field_content(0, "pWarns", maximum), 			PlayerInfo[playerid][pWarns] = strval(maximum);
	cache_get_field_content(0, "punWarns", maximum), 		PlayerInfo[playerid][punWarns] = strval(maximum);
	cache_get_field_content(0, "punWarnstime", maximum), 	PlayerInfo[playerid][punWarnstime] = strval(maximum);
	cache_get_field_content(0, "pFuel", maximum), 			PlayerInfo[playerid][pFuel] = strval(maximum);
	cache_get_field_content(0, "pRobTime", maximum), 		PlayerInfo[playerid][pRobTime] = strval(maximum);
	cache_get_field_content(0, "pReportTime", maximum), 	PlayerInfo[playerid][pReportTime] = strval(maximum);
	cache_get_field_content(0, "pVerevka", maximum), 		PlayerInfo[playerid][pVerevka] = strval(maximum);
	cache_get_field_content(0, "pOtmbI4ka", maximum), 		PlayerInfo[playerid][pOtmbI4ka] = strval(maximum);
	cache_get_field_content(0, "pAutoTime", maximum), 		PlayerInfo[playerid][pAutoTime] = strval(maximum);
	cache_get_field_content(0, "pAutoSkill", maximum), 		PlayerInfo[playerid][pAutoSkill] = strval(maximum);
	cache_get_field_content(0, "pMarried", maximum), 		PlayerInfo[playerid][pMarried] = strval(maximum);
	cache_get_field_content(0, "pMuteTime", maximum), 		PlayerInfo[playerid][pMuteTime] = strval(maximum);
	cache_get_field_content(0, "pMobile", maximum), 		PlayerInfo[playerid][pMobile] = strval(maximum);
	cache_get_field_content(0, "pBank", maximum), 			PlayerInfo[playerid][pBank] = strval(maximum);
	cache_get_field_content(0, "pBoxSkill", maximum), 		PlayerInfo[playerid][pBoxSkill] = strval(maximum);
	cache_get_field_content(0, "pKongfuSkill", maximum), 	PlayerInfo[playerid][pKongfuSkill] = strval(maximum);
	cache_get_field_content(0, "pKickboxSkill", maximum), 	PlayerInfo[playerid][pKickboxSkill] = strval(maximum);
	cache_get_field_content(0, "pFightSkill", maximum), 	PlayerInfo[playerid][pFightSkill] = strval(maximum);
	cache_get_field_content(0, "pFightSkil", maximum), 		PlayerInfo[playerid][pFightSkil] = strval(maximum);
	cache_get_field_content(0, "pFightTime", maximum), 		PlayerInfo[playerid][pFightTime] = strval(maximum);
	cache_get_field_content(0, "pHospital", maximum), 		PlayerInfo[playerid][pHospital] = strval(maximum);
	cache_get_field_content(0, "pIzol", maximum), 			PlayerInfo[playerid][pIzol] = strval(maximum);
	PlayerInfo[playerid][pDostup] = cache_get_field_content_int(0, "pDostup", connects);
	cache_get_field_content(0, "pZakonp", maximum), 		PlayerInfo[playerid][pZakonp] = strval(maximum);
	cache_get_field_content(0, "pNarcoLomka", maximum), 	PlayerInfo[playerid][pNarcoLomka] = strval(maximum);
	cache_get_field_content(0, "pProz", maximum), 			PlayerInfo[playerid][pProz] = strval(maximum);
	cache_get_field_content(0, "pMestoJail", maximum), 		PlayerInfo[playerid][pMestoJail] = strval(maximum);
	cache_get_field_content(0, "pWanted", maximum), 		PlayerInfo[playerid][pWanted] = strval(maximum);
	cache_get_field_content(0, "pHousecash", maximum), 		PlayerInfo[playerid][pHousecash] = strval(maximum);
	cache_get_field_content(0, "pNumbercar", maximum),		strmid(PlayerInfo[playerid][pNumbercar], maximum, 0, strlen(maximum), 64);
	cache_get_field_content(0, "pIpReg", maximum),			strmid(PlayerInfo[playerid][pIpReg], maximum, 0, strlen(maximum), 64);
	cache_get_field_content(0, "pSaveWeapon", maximum), 	PlayerInfo[playerid][pSaveWeapon] = strval(maximum);
	if(PlayerInfo[playerid][pSaveWeapon] == 1) {
		cache_get_field_content(0, "Weapons",PlayerInfo[playerid][pWeapons],connects,64), sscanf(PlayerInfo[playerid][pWeapons], "p<,>a<i>[13]",PlayerInfo[playerid][Weapon]);
		cache_get_field_content(0, "Ammos",PlayerInfo[playerid][Ammos],connects,64), sscanf(PlayerInfo[playerid][Ammos], "p<,>a<i>[13]",PlayerInfo[playerid][Ammo]);
	}
	cache_get_field_content(0, "day_online", maximum),		 PlayerInfo[playerid][pDayOnline] = strval(maximum);
	cache_get_field_content(0, "pDayAfk", maximum),		 PlayerInfo[playerid][pDayAfk] = strval(maximum);
    cache_get_field_content(0, "pOnlineYes", maximum),		 PlayerInfo[playerid][pOnlineYes] = strval(maximum);
	cache_get_field_content(0, "pAfkYes", maximum),		 PlayerInfo[playerid][pAfkYes] = strval(maximum);
	cache_get_field_content(0, "Texts",PlayerInfo[playerid][pTexts],connects,16), sscanf(PlayerInfo[playerid][pTexts], "p<,>a<i>[3]",PlayerInfo[playerid][Texts]);
    cache_get_field_content(0, "SkinHome1", maximum), 		 PlayerInfo[playerid][pSkinhome][0] = strval(maximum);
    cache_get_field_content(0, "SkinHome2", maximum), 		 PlayerInfo[playerid][pSkinhome][1] = strval(maximum);
    cache_get_field_content(0, "SkinHome3", maximum), 		 PlayerInfo[playerid][pSkinhome][2] = strval(maximum);
    cache_get_field_content(0, "pHomez", maximum),		     PlayerInfo[playerid][pHomez] = strval(maximum);
    cache_get_field_content(0, "satiety", maximum),		     PlayerInfo[playerid][pSatiety] = strval(maximum);
    cache_get_field_content(0, "keyip",PlayerInfo[playerid][pKeyIp],connects,16);
    cache_get_field_content(0, "pHotvet", maximum),			 PlayerInfo[playerid][pHotvet] = strval(maximum);
    cache_get_field_content(0, "family", maximum),			 PlayerInfo[playerid][pFamily] = strval(maximum);
	cache_get_field_content(0, "pRub", maximum),			 PlayerInfo[playerid][pRub] = strval(maximum);
    cache_get_field_content(0, "pAccent",PlayerInfo[playerid][pAccent],connects,32);
	PlayerInfo[playerid][pCheckIp] = cache_get_field_content_int(0,"checkip");
    cache_get_field_content(0, "pGetonIP",PlayerInfo[playerid][pGetonIP],connects,16);
    cache_get_field_content(0, "pGetonDate",PlayerInfo[playerid][pGetondate],connects,16);
    cache_get_field_content(0, "settings", maximum), sscanf(maximum, "p<,>a<i>[7]",PlayerInfo[playerid][Settings]);
    cache_get_field_content(0, "odet", maximum),			 PlayerInfo[playerid][pOdet] = strval(maximum);
    cache_get_field_content(0,"one_tuneveh", maximum, connects, 74), sscanf(maximum, "p<,>a<i>[15]",cTune[playerid][0]);
    cache_get_field_content(0,"two_tuneveh", maximum, connects, 74), sscanf(maximum, "p<,>a<i>[15]",cTune[playerid][1]);
    cache_get_field_content(0,"one_vehcolor", maximum, connects, 11), sscanf(maximum, "p<,>a<i>[2]",cColor[playerid][0]);
    cache_get_field_content(0,"two_vehcolor", maximum, connects, 11), sscanf(maximum, "p<,>a<i>[2]",cColor[playerid][1]);
    cache_get_field_content(0, "voenbill", maximum),			 PlayerInfo[playerid][pVoenBill] = strval(maximum);
    cache_get_field_content(0, "medcard", maximum),			 PlayerInfo[playerid][pMedCard] = strval(maximum);
    cache_get_field_content(0,  "drugs", maximum, connects, 64), sscanf(maximum, "a<i>[7]", PlayerInfo[playerid][p_drugs]);
    cache_get_field_content(0,"acessories",PlayerInfo[playerid][pSlotItems], connects, 64), sscanf(PlayerInfo[playerid][pSlotItems], "p<,>a<i>[6]",PlayerInfo[playerid][pSlotItem]);
    cache_get_field_content(0, "vigs", maximum),			 PlayerInfo[playerid][pVigs] = strval(maximum);
	cache_get_field_content(0, "CMDaccess", PlayerInfo[playerid][aiCMDaccess], connects, CMD_NUM+1);
	cache_get_field_content(0, "pPrefix",maximum,connects,32), strmid(PlayerInfo[playerid][pPrefix], maximum, 0, strlen(maximum), 32);
	cache_get_field_content(0, "c_Prefix",maximum,connects,32), strmid(PlayerInfo[playerid][c_Prefix], maximum, 0, strlen(maximum), 32);
	cache_get_field_content(0, "pInv", maximum),			 PlayerInfo[playerid][pInv] = strval(maximum);
	cache_get_field_content(0, "pBlNick", maximum),			 PlayerInfo[playerid][pBlNick] = strval(maximum);
	cache_get_field_content(0, "pcWarn", maximum),			 PlayerInfo[playerid][pcWarn] = strval(maximum);
	cache_get_field_content(0, "pcBan", maximum),			 PlayerInfo[playerid][pcBan] = strval(maximum);
//	cache_get_field_content(0, "pClover", maximum),				PlayerInfo[playerid][pClover] = strval(maximum);
	PlayerInfo[playerid][pOffCountry] = cache_get_field_content_int(0, "pOffCountry", connects);
	PlayerInfo[playerid][pRepAdm] = cache_get_field_content_int(0, "pRepAdm", connects);
	PlayerInfo[playerid][pKickAdm] = cache_get_field_content_int(0, "pKickAdm", connects);
	PlayerInfo[playerid][pWarnAdm] = cache_get_field_content_int(0, "pWarnAdm", connects);
	PlayerInfo[playerid][pBanAdm] = cache_get_field_content_int(0, "pBanAdm", connects);
	PlayerInfo[playerid][pMuteAdm] = cache_get_field_content_int(0, "pMuteAdm", connects);
	PlayerInfo[playerid][pJailAdm] = cache_get_field_content_int(0, "pJailAdm", connects);
	PlayerInfo[playerid][pAge] = cache_get_field_content_int(0,"age");
    PlayerInfo[playerid][pNational] = cache_get_field_content_int(0,"national");
	PlayerInfo[playerid][pOffBH] = cache_get_field_content_int(0,"pOffBH");
	PlayerInfo[playerid][pKInCapt] = cache_get_field_content_int(0,"pKInCapt");
	PlayerInfo[playerid][pUsedJail] = cache_get_field_content_int(0,"pUsedJail");
	if(PlayerInfo[playerid][pCash] <= 0) PlayerInfo[playerid][pCash] = 0;
	if(PlayerInfo[playerid][pProz] <= 0) PlayerInfo[playerid][pProz] = 0;
	
	if(PlayerInfo[playerid][pPhousekey] != 255)
	{
		if(strcmp(PlayerInfo[playerid][pNames], HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) { }
		else PlayerInfo[playerid][pPhousekey] = 255;
	}
	format(mysql_query_, sizeof(mysql_query_), "SELECT * FROM `"TABLE_BANLOG"` WHERE `name` = '%s'", PlayerInfo[playerid][pNames]);
	mysql_function_query(connects, mysql_query_, true, "Checkban", "ds", playerid, PlayerInfo[playerid][pNames]);
    return 1;
}
Параметр цвета c_Prefix

---------- Сообщение добавлено в 21:32 ---------- Предыдущее сообщение добавлено в 21:30 ----------

В добавок в чате после сообщение {} появились
PHP:
CMD:prefix(playerid, params[]) {
	//if(!is_cmd_allow(playerid, CMD_prefix)) return true;
	if(FD(playerid)) {
        if(PlayerInfo[playerid][pAlcoInvenxua] !=13) return true;
		if(sscanf(params,"iis[70]",params[0],params[1],params[2])) return SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}[{1DCA1D}Используйте{FFFFFF}] /prefix [ид] [цвет] [префикс]");
		if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Человек не найден!");
	    if(!(0 <= params[1] <= 3)) return SendClientMessage(playerid, -1, "Номер цвета не может быть меньше 1 и больше 4!");
	    new color[12], query[144], string[144];
	    switch(params[1])
	    {
	        case 0: color = "FF0000";//red
	        case 1: color = "FF00AE";//purple
	        case 2: color = "00FF48";//blue
	        case 3: color = "FFEE00";//blue
	    }

	    strmid(PlayerInfo[params[0]][pPrefix],params[2],0,24,24);
	    strmid(PlayerInfo[params[0]][c_Prefix],color,0,12,12);

        format(query, sizeof(query), "UPDATE `accounts`  SET `pPrefix` = '%s',`c_Prefix` = '%s' WHERE `name` = '%s'", PlayerInfo[params[0]][pPrefix],color, PlayerInfo[playerid][pNames]);
	    mysql_function_query(connects, query, false, "", "");

		format(string, sizeof(string), "{AFA9A9}[A] %s установил префикс '{%s}%s{AFA9A9}' администратору: %s", PlayerInfo[playerid][pNames], PlayerInfo[params[0]][c_Prefix], PlayerInfo[params[0]][pPrefix], PlayerInfo[params[0]][pNames]);
		SendAdminMessage(COLOR_GREY, string);
	}
	return 1;
}
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу