Guest User

La Commande (/invite) "Vevo.3D"

a guest
Jul 9th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.11 KB | None | 0 0
  1. //----------------------------------[INVITE]------------------------------------------------
  2. if(strcmp(cmd, "/invite", true) == 0)
  3. {
  4. if(IsPlayerConnected(playerid))
  5. {
  6. tmp = strtok(cmdtext, idx);
  7. if(!strlen(tmp))
  8. {
  9. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /invite [playerid/PartOfName]");
  10. return 1;
  11. }
  12. new para1;
  13. new ftext[20];
  14. para1 = ReturnUser(tmp);
  15. if (PlayerInfo[playerid][pLeader] >= 1)
  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 = "Police Force"; ChosenSkin[para1] = 71; SetPlayerSkin(para1, 71); }
  24. else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI/ATF"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
  25. else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "National Guard"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
  26. else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Firemen/Ambulance"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
  27. else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Surenos"; ChosenSkin[para1] = 116; SetPlayerSkin(para1, 116); }
  28. else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "La Famiglia Sinatra"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
  29. else if(PlayerInfo[playerid][pLeader] == 7) { return 1; }
  30. else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Hitman Agency"; 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] = 148; SetPlayerSkin(para1, 148); }
  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 = "Yamaguchi"; ChosenSkin[para1] = 169; SetPlayerSkin(para1, 169); }
  35. else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Chornaya Bratva"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 258); }
  36. else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Vice"; ChosenSkin[para1] = 143; SetPlayerSkin(para1, 143); }
  37. else { return 1; }
  38. GetPlayerName(para1, giveplayer, sizeof(giveplayer));
  39.  
  40. PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
  41. PlayerInfo[para1][pRank] = 1;
  42. printf("AdmCmd: %s has invited %s to join %s.", sendername, giveplayer, ftext);
  43. format(string, sizeof(string), " You have Joined the %s, you were invited by Leader %s", ftext, sendername);
  44. SendClientMessage(para1, COLOR_WHITE, string);
  45. format(string, sizeof(string), " You have Invited %s to join the %s.", giveplayer,ftext);
  46. SendClientMessage(playerid, COLOR_WHITE, string);
  47. }
  48. else
  49. {
  50. SendClientMessage(playerid, COLOR_GREY, " That player is currently Wanted / a Different Team / or already a Family Member.");
  51. return 1;
  52. }
  53. }
  54. }//not connected
  55. }
  56. else
  57. {
  58. SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command(leaders only)!");
  59. }
  60. }
  61. return 1;
  62. }
Advertisement
Add Comment
Please, Sign In to add comment