zvered
Новичок
Не могу с копов принять людей в фбр,пишет он уже где то состоит (давал и ранг 14).А с военных в копы берёт.
Вот код,замените на свой
Вот код,замените на свой
PHP:
else if(strcmp(cmd, "/iinvite", true) == 0)
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pLeader] == 21)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "::: Введите: /iinvite [id]");
new para1;
new ftext[20];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pLeader] == 21)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMember] == 3 && PlayerInfo[para1][pRank] >= 3 || PlayerInfo[para1][pMember] == 19 && PlayerInfo[para1][pRank] >= 3)
{
if(PlayerInfo[playerid][pLeader] == 1) { ftext = "Полиция LSPD"; ChosenSkin[para1] = 285; }
else if(PlayerInfo[playerid][pLeader] == 10) { ftext = "Полиция SFPD";ChosenSkin[para1] = 285; }
else if(PlayerInfo[playerid][pLeader] == 21) { ftext = "Полиция LVPD"; ChosenSkin[para1] = 285; }
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pMember];
PlayerInfo[para1][pRank] = 1;
format(string, sizeof(string), "Лидер %s пригласил Вас присоедениться к %s", sendername,ftext);
SendClientMessage(para1, 0x6495EDFF, string);
format(string, sizeof(string), "Вы пригласили %s присоедениться к %s.", giveplayer,ftext);
SendClientMessage(playerid, 0x6495EDFF, string);
SetPlayerInterior(para1,5);
ShowMenuForPlayer(ChoseSkin,para1);
new rand = random(sizeof(gInviteSpawns));
SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
TogglePlayerControllable(para1, 0);
SelectChar[para1] = 255;
PlayerInfo[para1][pJob] = 0;
SelectCharID[para1] = PlayerInfo[para1][pMember];
SelectCharPlace[para1] = 1;
PlayerInfo[para1][pModel] = ChosenSkin[para1];
SetPlayerVirtualWorld(para1,1);
OnPlayerUpdateRL(para1);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "У человека нет 3 ранга в армии!");
return 1;
}
}
}
}//not connected
// }
// else
//{
// SendClientMessage(playerid, COLOR_GRAD1, "Вы не лидер LSPD/SFPD/LVPD");
}
// return 1;
Последнее редактирование:
