if(strcmp(cmd, "/invite", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "ИСПОЛЬЗОВАНИЕ: /invite [id_игрока/ЧастьИмени]"); return 1; } new para1; new ftext[20]; para1 = ReturnUser(tmp); if (PlayerInfo[playerid][pLeader] >= 1) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { if (PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pLeader] == 0) { if(PlayerInfo[playerid][pLeader] == 1) { ftext = "SAPD"; PlayerLider[playerid] = 1;} else if(PlayerInfo[playerid][pLeader] == 2) { ftext = "FBI"; PlayerLider[playerid] = 2;} else if(PlayerInfo[playerid][pLeader] == 3) { ftext = "Армия"; PlayerLider[playerid] = 3;} else if(PlayerInfo[playerid][pLeader] == 4) { ftext = "МЧС"; PlayerLider[playerid] = 4;} else if(PlayerInfo[playerid][pLeader] == 5) { ftext = "La Cosa Nostra"; PlayerLider[playerid] = 5;} else if(PlayerInfo[playerid][pLeader] == 6) { ftext = "Якудза"; PlayerLider[playerid] = 6;} else if(PlayerInfo[playerid][pLeader] == 7) { ftext = "Мерия"; PlayerLider[playerid] = 7;} else if(PlayerInfo[playerid][pLeader] == 8) { ftext = "Хитманы"; PlayerLider[playerid] = 8;} else if(PlayerInfo[playerid][pLeader] == 9) { ftext = "Репортёры"; PlayerLider[playerid] = 9;} else if(PlayerInfo[playerid][pLeader] == 10) { ftext = "Такси"; PlayerLider[playerid] = 10;} else if(PlayerInfo[playerid][pLeader] == 11) { ftext = "Лицензиары"; PlayerLider[playerid] = 11;} else if(PlayerInfo[playerid][pLeader] == 12) { ftext = "S.W.A.T"; PlayerLider[playerid] = 12;} else if(PlayerInfo[playerid][pLeader] == 13) { ftext = "Русская мафия"; PlayerLider[playerid] = 13;} else if(PlayerInfo[playerid][pLeader] == 14) { ftext = "Grove Street Gang"; PlayerLider[playerid] = 14;} else if(PlayerInfo[playerid][pLeader] == 15) { ftext = "The Ballas Gang"; PlayerLider[playerid] = 15;} else if(PlayerInfo[playerid][pLeader] == 16) { ftext = "El Coronos Gang"; PlayerLider[playerid] = 16;} else if(PlayerInfo[playerid][pLeader] == 17) { ftext = "Los Santos Vagos"; PlayerLider[playerid] = 17;} else if(PlayerInfo[playerid][pLeader] == 18) { ftext = "San Fiero Rifa"; PlayerLider[playerid] = 18;} else if(PlayerInfo[playerid][pLeader] == 19) { ftext = "Bikers"; PlayerLider[playerid] = 19;} else if(PlayerInfo[playerid][pLeader] == 20) { ftext = "Street Racers"; PlayerLider[playerid] = 20;} else if(PlayerInfo[playerid][pLeader] == 21) { ftext = "ГИБДД"; PlayerLider[playerid] = 21;} else if(PlayerInfo[playerid][pLeader] == 22) { ftext = "Колхоз"; PlayerLider[playerid] = 22;} else if(PlayerInfo[playerid][pLeader] == 23) { ftext = "MC13"; PlayerLider[playerid] = 23;} GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "Вы пригласили %s в организацию %s.", giveplayer,ftext); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "{ff0000}Вас приглашает {ffff00}Лидер %s\n{ff0000}Вы согласны вступить в {00ff7f}%s ",sendername, ftext); ShowPlayerDialog(para1,333,DIALOG_STYLE_MSGBOX,"Вступление",string,"Согласен","Отказываюсь"); } else { SendClientMessage(playerid, COLOR_GREY, " Этот игрок уже состоит в другой организации."); return 1; } } }//not connected } else { SendClientMessage(playerid, COLOR_GRAD1, " Вы не лидер !"); } } return 1; }
Ко всем диалогам!
if(dialogid == 333) { new ftext[20]; if(response) { for(new i = 0; i < MAX_PLAYERS; i++) { if(PlayerLider[i] == 1) { ftext = "SAPD"; ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); } else if(PlayerLider[i] == 2) { ftext = "FBI"; ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); } else if(PlayerLider[i] == 3) { ftext = "Армия"; ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); } else if(PlayerLider[i] == 4) { ftext = "МЧС"; ChosenSkin[playerid] = 71; SetPlayerSkin(playerid, 71); } else if(PlayerLider[i] == 5) { ftext = "La Cosa Nostra"; ChosenSkin[playerid] = 290; SetPlayerSkin(playerid, 290); } else if(PlayerLider[i] == 6) { ftext = "Якудза"; ChosenSkin[playerid] = 121; SetPlayerSkin(playerid, 121); } else if(PlayerLider[i] == 7) { ftext = "Мерия"; ChosenSkin[playerid] = 150; SetPlayerSkin(playerid, 150); }//Red Cross else if(PlayerLider[i] == 8) { ftext = "Хитманы"; ChosenSkin[playerid] = 29; SetPlayerSkin(playerid, 29); } else if(PlayerLider[i] == 9) { ftext = "Репортёры"; ChosenSkin[playerid] = 148; SetPlayerSkin(playerid, 148); } else if(PlayerLider[i] == 10) { ftext = "Такси"; ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); } else if(PlayerLider[i] == 11) { ftext = "Лицензиары"; ChosenSkin[playerid] = 240; SetPlayerSkin(playerid, 240); } else if(PlayerLider[i] == 12) { ftext = "S.W.A.T"; ChosenSkin[playerid] = 285; SetPlayerSkin(playerid, 285); } else if(PlayerLider[i] == 13) { ftext = "Русская мафия"; ChosenSkin[playerid] = 126; SetPlayerSkin(playerid, 126); } else if(PlayerLider[i] == 14) { ftext = "Grove Street Gang"; ChosenSkin[playerid] = 105; SetPlayerSkin(playerid, 105); } else if(PlayerLider[i] == 15) { ftext = "The Ballas Gang"; ChosenSkin[playerid] = 102; SetPlayerSkin(playerid, 102); } else if(PlayerLider[i] == 16) { ftext = "El Coronos Gang"; ChosenSkin[playerid] = 114; SetPlayerSkin(playerid, 114); } else if(PlayerLider[i] == 17) { ftext = "Los Santos Vagos"; ChosenSkin[playerid] = 108; SetPlayerSkin(playerid, 108); } else if(PlayerLider[i] == 18) { ftext = "San Fiero Rifa"; ChosenSkin[playerid] = 175; SetPlayerSkin(playerid, 175); } else if(PlayerLider[i] == 19) { ftext = "Bikers"; ChosenSkin[playerid] = 181; SetPlayerSkin(playerid, 181); } else if(PlayerLider[i] == 20) { ftext = "Street Racers"; ChosenSkin[playerid] = 176; SetPlayerSkin(playerid, 176); } else if(PlayerLider[i] == 21) { ftext = "ГИБДД"; ChosenSkin[playerid] = 284; SetPlayerSkin(playerid, 284); } else if(PlayerLider[i] == 22) { ftext = "Колхоз"; ChosenSkin[playerid] = 162; SetPlayerSkin(playerid, 162); } else if(PlayerLider[i] == 23) { ftext = "MC13"; ChosenSkin[playerid] = 30; SetPlayerSkin(playerid, 30); } if(PlayerLider[i] > 0) PlayerInfo[playerid][pMember] = PlayerLider[i]; PlayerInfo[playerid][pRank] = 1; PlayerLider[i] = 0; } format(string, sizeof(string), "Вы вступили в %s", ftext); SendClientMessage(playerid, COLOR_WHITE, string); } else { SendClientMessage(playerid, COLOR_KRAS, "Вы отказались от вступления!"); return 1; } }
Вырезано с мода RW