Guest User

Untitled

a guest
Jun 13th, 2013
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.54 KB | None | 0 0
  1. HERE'S THE COMMAND:
  2.  
  3. COMMAND:invite(playerid, params[])
  4. {
  5. new victimname[MAX_PLAYER_NAME], leadername[MAX_PLAYER_NAME], id, string[500];
  6. if(PlayerInfo[playerid][pLeader] >= 1)
  7. {
  8. if (sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: (/invite) [id/ime]");
  9. if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "GRESKA: Nema takov igrac!");
  10.  
  11. GetPlayerName(id, victimname, sizeof(victimname));
  12. GetPlayerName(playerid, leadername, sizeof(leadername));
  13.  
  14. format(string, sizeof(string),"\nJas: %s te pokanuvam da rabotis za mene i da bides moj clen.\nDokolku Prifakjas pristisni 'Prifakjam'\nDokolku Odbivas pritisni 'Odbivam'\nDokolku se predomislis pobaraj me na Tel.Broj 1111", leadername);
  15.  
  16. ShowPlayerDialog(id, DIALOG_INVITE, DIALOG_STYLE_MSGBOX, "Pokana za clenstvo", string, "Prifakjam","Odbivam");
  17.  
  18. format(string, sizeof(string), "%s go pokanuva igracot %s da bide negov clen", leadername, victimname);
  19. ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  20. return 1;
  21. }
  22. else return SendClientMessage(playerid, COLOR_RED, "GRESKA: Ne ste ovlasteni za ovaa komanda!");
  23. }
  24.  
  25.  
  26. HERE'S THE DIALOG:
  27.  
  28. case DIALOG_INVITE:
  29. {
  30. if( response )
  31. {
  32. foreach(new i : Player)
  33. {
  34. if(IsPlayerConnected(i))
  35. {
  36. if(PlayerInfo[i][pLeader] == 1)
  37. {
  38. PlayerInfo[playerid][pTeam] = 1;
  39. ftext = "PD";
  40. PlayerInfo[playerid][pSkin] = 282;
  41. SetPlayerSkin(playerid, 282);
  42. }
  43. else if(PlayerInfo[i][pLeader] == 2)
  44. {
  45. PlayerInfo[playerid][pTeam] = 2;
  46. ftext = "FBI";
  47. PlayerInfo[playerid][pSkin] = 24;
  48. SetPlayerSkin(playerid, 24);
  49. }
  50. else if(PlayerInfo[i][pLeader] == 3)
  51. {
  52. PlayerInfo[playerid][pTeam] = 3;
  53. ftext = "ARM";
  54. PlayerInfo[playerid][pSkin] = 285;
  55. SetPlayerSkin(playerid, 285);
  56. }
  57. else if(PlayerInfo[i][pLeader] == 4)
  58. {
  59. PlayerInfo[playerid][pTeam] = 4;
  60. ftext = "MD";
  61. PlayerInfo[playerid][pSkin] = 276;
  62. SetPlayerSkin(playerid, 276);
  63. }
  64. else if(PlayerInfo[i][pLeader] == 5)
  65. {
  66. PlayerInfo[playerid][pTeam] = 5;
  67. ftext = "LCN";
  68. PlayerInfo[playerid][pSkin] = 112;
  69. SetPlayerSkin(playerid, 112);
  70. }
  71. else if(PlayerInfo[i][pLeader] == 6)
  72. {
  73. PlayerInfo[playerid][pTeam] = 6;
  74. ftext = "Yakuza";
  75. PlayerInfo[playerid][pSkin] = 121;
  76. SetPlayerSkin(playerid, 121);
  77. }
  78. else if(PlayerInfo[i][pLeader] == 7)
  79. {
  80. PlayerInfo[playerid][pTeam] = 7;
  81. ftext = "Vlada";
  82. PlayerInfo[playerid][pSkin] = 164;
  83. SetPlayerSkin(playerid, 164);
  84. }
  85. else if(PlayerInfo[i][pLeader] == 8)
  86. {
  87. PlayerInfo[playerid][pTeam] = 8;
  88. ftext = "Hitman";
  89. PlayerInfo[playerid][pSkin] = 20;
  90. SetPlayerSkin(playerid, 20);
  91. }
  92. else if(PlayerInfo[i][pLeader] == 9)
  93. {
  94. PlayerInfo[playerid][pTeam] = 9;
  95. ftext = "Kanal 1";
  96. PlayerInfo[playerid][pSkin] = 1;
  97. SetPlayerSkin(playerid, 1);
  98. }
  99. else if(PlayerInfo[i][pLeader] == 10)
  100. {
  101. PlayerInfo[playerid][pTeam] = 10;
  102. ftext = "Taxi";
  103. PlayerInfo[playerid][pSkin] = 210;
  104. SetPlayerSkin(playerid, 210);
  105. }
  106. else if(PlayerInfo[i][pLeader] == 11)
  107. {
  108. PlayerInfo[playerid][pTeam] = 11;
  109. ftext = "Ballas";
  110. PlayerInfo[playerid][pSkin] = 103;
  111. SetPlayerSkin(playerid, 103);
  112. }
  113. else if(PlayerInfo[i][pLeader] == 12)
  114. {
  115. PlayerInfo[playerid][pTeam] = 12;
  116. ftext = "LSG";
  117. PlayerInfo[playerid][pSkin] = 175;
  118. SetPlayerSkin(playerid, 175);
  119. }
  120. else if(PlayerInfo[i][pLeader] == 13)
  121. {
  122. PlayerInfo[playerid][pTeam] = 13;
  123. ftext = "GSF";
  124. PlayerInfo[playerid][pSkin] = 105;
  125. SetPlayerSkin(playerid, 105);
  126. }
  127. else if(PlayerInfo[i][pLeader] == 14)
  128. {
  129. PlayerInfo[playerid][pTeam] = 14;
  130. ftext = "FD";
  131. PlayerInfo[playerid][pSkin] = 277;
  132. SetPlayerSkin(playerid, 277);
  133. }
  134. else if(PlayerInfo[i][pLeader] == 15)
  135. {
  136. PlayerInfo[playerid][pTeam] = 15;
  137. ftext = "MRD";
  138. PlayerInfo[playerid][pSkin] = 247;
  139. SetPlayerSkin(playerid, 247);
  140. }
  141. PlayerInfo[playerid][pRank] = 1;
  142. }
  143. }
  144. GetPlayerName(playerid, pname, sizeof(pname));
  145. format(string, sizeof(string), "Ja prifativte ponudata i sega ste vo %s", ftext);
  146. SendClientMessage(playerid, COLOR_WHITE, string);
  147. format(string, sizeof(string), "%s ja prifati ponudata za clenstvo.", pname);
  148. ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  149. }
  150. else if ( !response )
  151. {
  152. GetPlayerName(playerid, pname, sizeof(pname));
  153. SendClientMessage(playerid, COLOR_WHITE,"Ja odbivte ponudata za clenstvo!");
  154. format(string, sizeof(string), "%s ja odbi ponudata za clenstvo.", pname);
  155. ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  156. }
  157. return 1;
  158. }
Advertisement
Add Comment
Please, Sign In to add comment