Sobrane |
Дата: Вторник, 31.07.2018, 16:27 | Сообщение # 1
|
Новичок
Сообщений: 13
Статус: Offline
|
[/spoiler]publics: Fraction_CallBack_3(playerid, type) { new rows,fields; cache_get_data(rows,fields,connects); if(!rows) return SendClientMessage(playerid, -1, ""#NET"Âíóòðèèãðîâàÿ îøèáêà #2"); new Name[24]; string[0] = EOS; cache_get_field_content(0, "Name", Name, connects, sizeof(Name)); if(IsPlayerConnected(GetPlayerID(Name))) { if(GetPVarInt(playerid, "cFractionList")) { for(new i; i < 15; i ++) StringName[playerid][i][0] = EOS; DeletePVar(playerid, "cFractionList"); } return SendClientMessage(playerid, -1, ""#NET"Èãðîê â ñåòè!"); } switch(type) { case 0: { switch(cache_get_field_content_int(0, "pMember", connects)) { case 1, 10, 21: if(cache_get_field_content_int(0, "pRank", connects) >= 14) return SendClientMessage(playerid, -1, ""#NET"Ó èãðîêà ìàêñèìàëüíûé ðàíã!"); case 2,4,5,11..15,17,18,22,24..26: if(cache_get_field_content_int(0, "pRank", connects) >= 9) return SendClientMessage(playerid, -1, ""#NET"Ó èãðîêà ìàêñèìàëüíûé ðàíã!"); case 3, 19, 20: if(cache_get_field_content_int(0, "pRank", connects) >= 14) return SendClientMessage(playerid, -1, ""#NET"Ó èãðîêà ìàêñèìàëüíûé ðàíã!"); case 7: if(cache_get_field_content_int(0, "pRank", connects) >= 5) return SendClientMessage(playerid, -1, ""#NET"Ó èãðîêà ìàêñèìàëüíûé ðàíã!"); case 8: if(cache_get_field_content_int(0, "pRank", connects) >= 5) return SendClientMessage(playerid, -1, ""#NET"Ó èãðîêà ìàêñèìàëüíûé ðàíã!"); case 16: if(cache_get_field_content_int(0, "pRank", connects) >= 12) return SendClientMessage(playerid, -1, ""#NET"Ó èãðîêà ìàêñèìàëüíûé ðàíã!"); case 23: if(cache_get_field_content_int(0, "pRank", connects) >= 8) return SendClientMessage(playerid, -1, ""#NET"Ó èãðîêà ìàêñèìàëüíûé ðàíã!"); case 27: if(cache_get_field_content_int(0, "pRank", connects) >= 10) return SendClientMessage(playerid, -1, ""#NET"Ó èãðîêà ìàêñèìàëüíûé ðàíã!"); } mysql_format(connects, string, 164, "UPDATE `accounts` SET `pRank` = `pRank` + '1' WHERE `Name` = '%e'", StringName[playerid][GetPVarInt(playerid, "cFractionList")]); mysql_empty(connects, string); format(string,164,"[Offline] Ëèäåð îðãàíèçàöèè %s ïîâûñèë ñîòðóäíèêà %s äî %d ðàíãà",PlayerInfo[playerid][pNames], Name, cache_get_field_content_int(0, "pRank", connects)+1); } case 1: { if(cache_get_field_content_int(0, "pRank", connects) < 1) return SendClientMessage(playerid, -1, ""#NET"Ó èãðîêà ïåðâûé ðàíã!"); if(cache_get_field_content_int(0, "pLeader", connects) > 1) return SendClientMessage(playerid, -1, ""#NET"Íåëüçÿ ïîíèçèòü ëèäåðà"); mysql_format(connects, string, 164, "UPDATE `accounts` SET `pRank` = `pRank` - '1' WHERE `Name` = '%e'", StringName[playerid][GetPVarInt(playerid, "cFractionList")]); mysql_empty(connects, string); format(string,164,"[Offline] Ëèäåð îðãàíèçàöèè %s ïîíèçèë ñîòðóäíèêà %s äî %d ðàíãà",PlayerInfo[playerid][pNames], Name, cache_get_field_content_int(0, "pRank", connects)-1); } case 2: { if(cache_get_field_content_int(0, "pLeader", connects) >= 1) return SendClientMessage(playerid, -1, ""#NET"Óâîëèë"); mysql_format(connects, string, 164, "UPDATE `accounts` SET `pMember` = '0',`pRank` = '0' WHERE `Name` = '%e'", StringName[playerid][GetPVarInt(playerid, "cFractionList")]); mysql_empty(connects, string); format(string,164,"Ëèäåð îðãàíèçàöèè %s óâîëèë â îôôëàéíå ñîòðóäíèêà %s",PlayerInfo[playerid][pNames], Name); } } if(strlen(string)) SendFamilyMessage(PlayerInfo[playerid][pMember], 0xFFBC00FF, string); else SendClientMessage(playerid, -1, ""#NET"Ïðîèçîøëà îøèáêà, ñîîáùèòå îá ýòîì àäìèíèñòðàòîðó!"); if(GetPVarInt(playerid, "cFractionList")) { for(new i; i < 15; i ++) StringName[playerid][i][0] = EOS; DeletePVar(playerid, "cFractionList"); } return 1; }[/spoiler1]
sdfsf
|
|
|
|