murad151
Новичок
Привет всем, у менять проблема, когда кого то приглашаю во фракцию, например ID 7 или любой другой, система принимает ID 0.
Как это исправить?
Как это исправить?
PHP:
CMD:invite(playerid, params[])
{
if(sscanf(params,"d",params[0])) return SendClientMessage(playerid, COLOR_GRAD2, "Ââåäèòå: /invite [id]");
if(IsPlayerInAnyVehicle(params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Èãðîê â ìàøèíå!");
if (PlayerInfo[params[0]][pMRInections] > 0 || PlayerInfo[params[0]][pLRInections] > 0) return SendClientMessage(playerid, COLOR_WHITE, "Èãðîê óæå ãäå òî ñîñòîèò");
if(PlayerInfo[params[0]][pWarns] >= 1) return SendClientMessage(playerid, COLOR_GRAD1,"Ó èãðîêà Warn.");
if(!IsPlayerConnected(params[0]) || params[0] == INVALID_PLAYER_ID) return true;
if(!ProxDetectorS(10.0, playerid, params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Èãðîê, íå ðÿäîì ñ âàìè !");
if (PlayerInfo[playerid][pLRInections] == 1 || PlayerInfo[playerid][pMRInections] == 1 && PlayerInfo[playerid][pRKInections] == 14)
{
if (PlayerInfo[playerid][pRKInections] < 3 || PlayerInfo[params[0]][pLevel] < 1) return SendClientMessage(playerid, COLOR_GREY, "Ïðè¸ì âîçìîæåí ñ 1 lvl");
}
else if (PlayerInfo[playerid][pLRInections] == 2 || PlayerInfo[playerid][pMRInections] == 2 && PlayerInfo[playerid][pRKInections] == 9) { }
else if (PlayerInfo[playerid][pLRInections] == 3 || PlayerInfo[playerid][pMRInections] == 3 && PlayerInfo[playerid][pRKInections] == 14) { }
else if (PlayerInfo[playerid][pLRInections] == 4 || PlayerInfo[playerid][pMRInections] == 4 && PlayerInfo[playerid][pRKInections] >= 9) { }
else if (PlayerInfo[playerid][pLRInections] == 5 || PlayerInfo[playerid][pMRInections] == 5 && PlayerInfo[playerid][pRKInections] == 9) { }
else if (PlayerInfo[playerid][pLRInections] == 6 || PlayerInfo[playerid][pMRInections] == 6 && PlayerInfo[playerid][pRKInections] == 9) { }
else if (PlayerInfo[playerid][pLRInections] == 7 || PlayerInfo[playerid][pMRInections] == 7 && PlayerInfo[playerid][pRKInections] == 5) { }
else if (PlayerInfo[playerid][pLRInections] == 8 || PlayerInfo[playerid][pMRInections] == 8 && PlayerInfo[playerid][pRKInections] == 4) { }
else if (PlayerInfo[playerid][pLRInections] == 10 || PlayerInfo[playerid][pMRInections] == 10 && PlayerInfo[playerid][pRKInections] == 14) { }
else if (PlayerInfo[playerid][pLRInections] == 11 || PlayerInfo[playerid][pMRInections] == 11 && PlayerInfo[playerid][pRKInections] == 9) { }
else if (PlayerInfo[playerid][pLRInections] == 12 || PlayerInfo[playerid][pMRInections] == 12 && PlayerInfo[playerid][pRKInections] == 9) { }
else if (PlayerInfo[playerid][pLRInections] == 13 || PlayerInfo[playerid][pMRInections] == 13 && PlayerInfo[playerid][pRKInections] == 9) { }
else if (PlayerInfo[playerid][pLRInections] == 14 || PlayerInfo[playerid][pMRInections] == 14 && PlayerInfo[playerid][pRKInections] == 9) { }
else if (PlayerInfo[playerid][pLRInections] == 15 || PlayerInfo[playerid][pMRInections] == 15 && PlayerInfo[playerid][pRKInections] == 9) { }
else if (PlayerInfo[playerid][pLRInections] == 16 || PlayerInfo[playerid][pMRInections] == 16 && PlayerInfo[playerid][pRKInections] >= 9) { }
else if (PlayerInfo[playerid][pLRInections] == 17 || PlayerInfo[playerid][pMRInections] == 17 && PlayerInfo[playerid][pRKInections] == 9) { }
else if (PlayerInfo[playerid][pLRInections] == 18 || PlayerInfo[playerid][pMRInections] == 18 && PlayerInfo[playerid][pRKInections] == 9) { }
else if (PlayerInfo[playerid][pLRInections] == 19 || PlayerInfo[playerid][pMRInections] == 19 && PlayerInfo[playerid][pRKInections] == 14) { }
else if (PlayerInfo[playerid][pLRInections] == 21 || PlayerInfo[playerid][pMRInections] == 21 && PlayerInfo[playerid][pRKInections] == 14) { }
else if (PlayerInfo[playerid][pLRInections] == 22 || PlayerInfo[playerid][pMRInections] == 22 && PlayerInfo[playerid][pRKInections] >= 9) { }
else return true;
GetFrak(playerid,PlayerInfo[playerid][pMRInections],1147);
SetPVarInt(params[0],"Invite",1);
SetPVarInt(params[0],"Player",playerid);
return true;
}
PHP:
case 1147:
{
if(!response) return DeletePVar(playerid,"invite");
params[0] = GetPVarInt(playerid,"invite");
ChangeSkin(PlayerInfo[playerid][pMRInections],params[0],listitem);
PlayerInfo[params[0]][pRKInections] = 1;
PlayerInfo[params[0]][pMRInections] = PlayerInfo[playerid][pMRInections];
GetFractionColor(params[0]);
gov[params[0]] = 600;
new ttext[30];
switch(PlayerInfo[playerid][pMRInections])
{
case 1: ttext = "LSPD";
case 2: ttext = "ÔÁÐ";
case 3: ttext = "Àðìèÿ: Àâèàíîñåö";
case 4: ttext = "Ì×Ñ";
case 5: ttext = "Êîëóìáèéñêàÿ ìàôèÿ";
case 6: ttext = "Yakuza";
case 7: ttext = "Ìýðèÿ";
case 10: ttext = "SFPD";
case 11: ttext = "Èíñòðóêòîðû";
case 12: ttext = "The Ballas";
case 13: ttext = "The Vagos";
case 14: ttext = "Ìåêñèêàíñêàÿ ìàôèÿ";
case 15: ttext = "The Grove";
case 16: ttext = "Íîâîñòíàÿ ñåòü";
case 17: ttext = "The Aztecas";
case 18: ttext = "The Rifa";
case 19: ttext = "Àðìèÿ: Çîíà 51";
case 21: ttext = "LVPD";
case 22: ttext = "Ðàäèîöåíòð SF";
}
format(stringer,sizeof(stringer),"%s áûë ïðèíÿò âî ôðàêöèþ %s",PlayerInfo[params[0]][pNames],ttext);
SendClientMessage(playerid,COLOR_BLUE,stringer);
format(stringer,sizeof(stringer),"Âû áûëè ïðèíÿòû âî ôðàêöèþ %s",ttext);
SendClientMessage(params[0],COLOR_BLUE,stringer);
DeletePVar(playerid,"invite");
return 1;
}
