- 10
- 0
При компиляции мода, выдает следующие ошибки:
Часть кода где есть ошибки:
CMD:family(playerid, params[])
{
if (!pInfo[playerid][pLogin]) return true;
if (pInfo[playerid][pMuted] > 0) return IsPlayerMuted(playerid);
if (pTemp[playerid][AntiFloodText] > gettime()) return SendClientMessage(playerid, 0xFFD5BBAA, !"Не флуди!");
if (!IsPlayerGetSettings(playerid, setFractionChat)) return SendClientMessage(playerid, COLOR_GREY, !"Включите чат организации в настройках (/mm - Настройки)");
if (sscanf(params, "s[128]", params[0])) return SendClientMessage(playerid, COLOR_WHITE, !"Введите: (/f)amily [текст]");
if(!Reklama(playerid, params[0])) return 1;
pTemp[playerid][AntiFloodText] = gettime()+2;
new string_[160];
if (GetPlayerTaxi{playerid} == 1)
{
format(string_, sizeof(string_), "[T.LVL %d]: "colwhi"%s %s",pInfo[playerid][pTaxiLevel], pInfo[playerid][pName], params[0]);
foreach(new i: JobTaxi)
{
SendClientMessage(i, 0xAA5C40FF, string_);
}
return 1;
}
if (pInfo[playerid][pJob] == 7)
{
format(string_, sizeof(string_), "%s [T.LVL %d]: "colwhi"%s",pInfo[playerid][pName], pInfo[playerid][pDLevel], params[0]);
SendJobMessage(7, 0x4d6783FF, string_);
return 1;
}//pTemp[select_id][JobInFarmRank]
if (pTemp[playerid][JobInFarmRank] > 2)
{
new FARM_ID = pTemp[playerid][TempFermID];
switch(pTemp[playerid][JobInFarmRank])
{
case 2: format(string_, sizeof(string_), "[FARM %d] Фермер %s: %s",FARM_ID-1, pInfo[playerid][pName], params[0]);
case 3: format(string_, sizeof(string_), "[FARM %d] Заместитель %s: %s",FARM_ID-1, pInfo[playerid][pName], params[0]);
case 4: format(string_, sizeof(string_), "[FARM %d] Владелец %s: %s",FARM_ID-1, pInfo[playerid][pName], params[0]);
}
foreach(new i: PlayerInLogin)
{
if (!pInfo[pLogin]) continue;
if (pTemp[JobInFarmRank] < 2)continue;
if (pTemp[TempFermID] == FARM_ID)
{
SendClientMessage(i,TEAM_AZTECAS_COLOR,string_);
}
}
return 1;
}
if (GetPVarInt(playerid,"CasinoRank"))
{
for(new i = 1; i <= TOTALCASINO; i++)
{
if (!IsPlayerInRangeOfPoint(playerid, 300, CasinoInfo[caPos][0], CasinoInfo[caPos][1], CasinoInfo[caPos][2])) continue;
switch(GetPVarInt(playerid,"CasinoRank"))
{
case 1: format(string_, sizeof(string_), "[CASINO] Крупье %s: %s", pInfo[playerid][pName], params[0]);
default: format(string_, sizeof(string_), "[CASINO] Менеджер %s: %s", pInfo[playerid][pName], params[0]);
}
}
for(new i = 1; i <= TOTALCASINO; i++)
{
foreach(new idx: PlayerInLogin)
{
if (!IsPlayerInRangeOfPoint(idx, 300,CasinoInfo[caPos][0],CasinoInfo[caPos][1], CasinoInfo[caPos][2]) || !GetPVarInt(idx,"CasinoRank")) continue;
if (GetCasino(idx, i) && GetCasino(playerid, idx) && GetPVarInt(idx,"CasinoRank"))
{
SendClientMessage(idx,TEAM_AZTECAS_COLOR,string_);
}
}
}
return 1;
}
if (pInfo[playerid][FractionMute] > 0) {
format(string_, sizeof string_, "У Вас бан чата организации! До снятия: %d секунд(ы)", pInfo[playerid][FractionMute]);
SendClientMessage(playerid, COLOR_YELLOW, string_);
return 1;
}
if (!IsAMafia(playerid) && !IsAGang(playerid) && !IsABiker(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, !"Вы не член какой-либо фракции!");
if (!pTemp[playerid][tDutyWork]) return SendClientMessage(playerid, COLOR_GREY, !"Начните рабочий день!");
format(string_, sizeof(string_), "[F] %s %s: %s", fFractionRank[pInfo[playerid][pMember]][pInfo[playerid][pRank] - 1], pInfo[playerid][pName], params[0]);
SendFamilyMessage(pInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string_);
if (tipsteron == pInfo[playerid][pMember])
{
foreach(new i: PlayerInLogin)
{
if (!pInfo[pLogin]) continue;
if (tipsterlisten)
{
SendClientMessage(i, COLOR_LIGHTRED, string_);
}
}
}
return 1;
}
alias:family("f");
Полный код мода закрепил ниже
Часть кода где есть ошибки:
CMD:family(playerid, params[])
{
if (!pInfo[playerid][pLogin]) return true;
if (pInfo[playerid][pMuted] > 0) return IsPlayerMuted(playerid);
if (pTemp[playerid][AntiFloodText] > gettime()) return SendClientMessage(playerid, 0xFFD5BBAA, !"Не флуди!");
if (!IsPlayerGetSettings(playerid, setFractionChat)) return SendClientMessage(playerid, COLOR_GREY, !"Включите чат организации в настройках (/mm - Настройки)");
if (sscanf(params, "s[128]", params[0])) return SendClientMessage(playerid, COLOR_WHITE, !"Введите: (/f)amily [текст]");
if(!Reklama(playerid, params[0])) return 1;
pTemp[playerid][AntiFloodText] = gettime()+2;
new string_[160];
if (GetPlayerTaxi{playerid} == 1)
{
format(string_, sizeof(string_), "[T.LVL %d]: "colwhi"%s %s",pInfo[playerid][pTaxiLevel], pInfo[playerid][pName], params[0]);
foreach(new i: JobTaxi)
{
SendClientMessage(i, 0xAA5C40FF, string_);
}
return 1;
}
if (pInfo[playerid][pJob] == 7)
{
format(string_, sizeof(string_), "%s [T.LVL %d]: "colwhi"%s",pInfo[playerid][pName], pInfo[playerid][pDLevel], params[0]);
SendJobMessage(7, 0x4d6783FF, string_);
return 1;
}//pTemp[select_id][JobInFarmRank]
if (pTemp[playerid][JobInFarmRank] > 2)
{
new FARM_ID = pTemp[playerid][TempFermID];
switch(pTemp[playerid][JobInFarmRank])
{
case 2: format(string_, sizeof(string_), "[FARM %d] Фермер %s: %s",FARM_ID-1, pInfo[playerid][pName], params[0]);
case 3: format(string_, sizeof(string_), "[FARM %d] Заместитель %s: %s",FARM_ID-1, pInfo[playerid][pName], params[0]);
case 4: format(string_, sizeof(string_), "[FARM %d] Владелец %s: %s",FARM_ID-1, pInfo[playerid][pName], params[0]);
}
foreach(new i: PlayerInLogin)
{
if (!pInfo[pLogin]) continue;
if (pTemp[JobInFarmRank] < 2)continue;
if (pTemp[TempFermID] == FARM_ID)
{
SendClientMessage(i,TEAM_AZTECAS_COLOR,string_);
}
}
return 1;
}
if (GetPVarInt(playerid,"CasinoRank"))
{
for(new i = 1; i <= TOTALCASINO; i++)
{
if (!IsPlayerInRangeOfPoint(playerid, 300, CasinoInfo[caPos][0], CasinoInfo[caPos][1], CasinoInfo[caPos][2])) continue;
switch(GetPVarInt(playerid,"CasinoRank"))
{
case 1: format(string_, sizeof(string_), "[CASINO] Крупье %s: %s", pInfo[playerid][pName], params[0]);
default: format(string_, sizeof(string_), "[CASINO] Менеджер %s: %s", pInfo[playerid][pName], params[0]);
}
}
for(new i = 1; i <= TOTALCASINO; i++)
{
foreach(new idx: PlayerInLogin)
{
if (!IsPlayerInRangeOfPoint(idx, 300,CasinoInfo[caPos][0],CasinoInfo[caPos][1], CasinoInfo[caPos][2]) || !GetPVarInt(idx,"CasinoRank")) continue;
if (GetCasino(idx, i) && GetCasino(playerid, idx) && GetPVarInt(idx,"CasinoRank"))
{
SendClientMessage(idx,TEAM_AZTECAS_COLOR,string_);
}
}
}
return 1;
}
if (pInfo[playerid][FractionMute] > 0) {
format(string_, sizeof string_, "У Вас бан чата организации! До снятия: %d секунд(ы)", pInfo[playerid][FractionMute]);
SendClientMessage(playerid, COLOR_YELLOW, string_);
return 1;
}
if (!IsAMafia(playerid) && !IsAGang(playerid) && !IsABiker(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, !"Вы не член какой-либо фракции!");
if (!pTemp[playerid][tDutyWork]) return SendClientMessage(playerid, COLOR_GREY, !"Начните рабочий день!");
format(string_, sizeof(string_), "[F] %s %s: %s", fFractionRank[pInfo[playerid][pMember]][pInfo[playerid][pRank] - 1], pInfo[playerid][pName], params[0]);
SendFamilyMessage(pInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string_);
if (tipsteron == pInfo[playerid][pMember])
{
foreach(new i: PlayerInLogin)
{
if (!pInfo[pLogin]) continue;
if (tipsterlisten)
{
SendClientMessage(i, COLOR_LIGHTRED, string_);
}
}
}
return 1;
}
alias:family("f");
Полный код мода закрепил ниже