Guest User

Untitled

a guest
Oct 20th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.66 KB | None | 0 0
  1. if(strcmp(cmd, "/inviter", true) == 0 || strcmp(cmd, "/invite", true) == 0 || strcmp(cmd, "/invit", true) == 0)
  2. //if(strcmp(cmd, "/inviter", true) == 0)
  3. {
  4. if(IsPlayerConnected(playerid))
  5. {
  6. tmp = strtok(cmdtext, idx);
  7. if(!strlen(tmp))
  8. {
  9. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /inviter [playerid/PartOfName]");
  10. return 1;
  11. }
  12. new para1;
  13. new ftext[20];
  14. para1 = ReturnUser(tmp);
  15. if (PlayerInfo[playerid][pLeader] >= 1 || PlayerInfo[playerid][pRank] >= 5)
  16. {
  17. if(IsPlayerConnected(para1))
  18. {
  19. if(para1 != INVALID_PLAYER_ID)
  20. {
  21. if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
  22. {
  23. if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policier"; ChosenSkin[para1] = 71; SetPlayerSkin(para1, 71); }
  24. else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
  25. else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Garde National"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
  26. else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Medecin"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
  27. else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Vagos"; ChosenSkin[para1] = 175; SetPlayerSkin(para1, 175); }
  28. else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "Vercetti"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 258); }
  29. else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 11; gTeam[para1] = 11; ftext = "Gouvernement"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163); }
  30. else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Hitman"; ChosenSkin[para1] = 249; SetPlayerSkin(para1, 249); }
  31. else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "ABC Studio"; ChosenSkin[para1] = 36; SetPlayerSkin(para1, 36); }
  32. //else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Cab Company"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
  33. //else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "School Instructors"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
  34. else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Bikers"; ChosenSkin[para1] = 122; SetPlayerSkin(para1, 122); }
  35. else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Ballas"; ChosenSkin[para1] = 67; SetPlayerSkin(para1, 67); }
  36. else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Groove"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
  37. else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "Corleone"; ChosenSkin[para1] = 185; SetPlayerSkin(para1, 185); }
  38. else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "C.I.A"; ChosenSkin[para1] = 294; SetPlayerSkin(para1, 294); }
  39. else { return 1; }
  40. GetPlayerName(para1, giveplayer, sizeof(giveplayer));
  41. GetPlayerName(playerid, sendername, sizeof(sendername));
  42. PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
  43. PlayerInfo[para1][pRank] = 1;
  44. printf("%s a invité %s à le rejoindre %s.", sendername, giveplayer, ftext);
  45. format(string, sizeof(string), "Vous avez été invité dans une Faction par le Leader %s", sendername);
  46. SendClientMessage(para1, COLOR_WHITE, string);
  47. format(string, sizeof(string), "Vous avez invité %s a rejoindre Votre faction %s.", ftext);
  48. SendClientMessage(playerid, COLOR_WHITE, string);
  49. format(string, sizeof(string), "HQ: La personne %s a été invité dans la Faction par une personne hautement placée.", giveplayer);
  50. SendRadioMessage(playerid, COLOR_WHITE, string);
  51. }
  52. else
  53. {
  54. SendClientMessage(playerid, COLOR_GREY, "Joueur déjà dans une faction.");
  55. return 1;
  56. }
  57. }
  58. }//not connected
  59. }
  60. }
  61. return 1;
  62. }
Add Comment
Please, Sign In to add comment