Advertisement
Guest User

Untitled

a guest
Aug 7th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.17 KB | None | 0 0
  1. ovu komandu sam dodo pod staru /invite
  2.  
  3. if(strcmp(cmd, "/invite", true) == 0)
  4. {
  5. if(IsPlayerConnected(playerid))
  6. {
  7. tmp = strtok(cmdtext, idx);
  8. if(!strlen(tmp))
  9. {
  10. SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}/invite [ID/Ime na Igrac]");
  11. return 1;
  12. }
  13. giveplayerid = ReturnUser(tmp);
  14. if(IsPlayerConnected(giveplayerid))
  15. {
  16. if(giveplayerid != INVALID_PLAYER_ID)
  17. {
  18. if(ProxDetectorS(3.0, playerid, giveplayerid))
  19. {
  20. if (PlayerInfo[playerid][pLeader] >= 1)
  21. {
  22. new sendername[MAX_PLAYER_NAME];
  23. GetPlayerName(playerid, sendername, sizeof(sendername));
  24. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  25. new string[261];
  26. 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 %d", sendername,broj);
  27. ShowPlayerDialog(giveplayerid, DIALOG_POKANA, DIALOG_STYLE_MSGBOX, "Pokana za Clenstvo", string, "Prifakjam","Odbivam");
  28. format(string, sizeof(string), "%s go pokanuva igracot %s da bide negov clen", sendername, giveplayer);
  29. printf("%s go pokanuva igracot %s da bide negov clen.", sendername, giveplayer);
  30. ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  31. Pokana[giveplayerid] = 1;
  32. Pokanet[giveplayerid] = 1;
  33. Pokanuvac[giveplayerid] = playerid;
  34. Invite[giveplayerid] = PlayerInfo[playerid][pLeader];
  35. return 1;
  36. }
  37. }
  38. }
  39. }
  40. }
  41. return 1;
  42. }
  43.  
  44.  
  45.  
  46. ovo pod OnDialogResponse
  47.  
  48. if(dialogid == DIALOG_POKANA)
  49. {
  50. if(response)
  51. {
  52. if(PlayerInfo[Pokanuvac[playerid]][pLeader] == 1) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "PD"; ChosenSkin[playerid] = 282; SetPlayerSkin(playerid, 282); }
  53. else if(PlayerInfo[Pokanuvac[playerid]][pLeader] == 2) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "MBI"; ChosenSkin[playerid] = 24; SetPlayerSkin(playerid, 24); }
  54. else if(PlayerInfo[Pokanuvac[playerid]][pLeader] == 3) { PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; ftext = "ARM"; ChosenSkin[playerid] = 285; SetPlayerSkin(playerid, 285); }
  55. else if(PlayerInfo[Pokanuvac[playerid]][pLeader] == 4) { PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; ftext = "MD"; ChosenSkin[playerid] = 276; SetPlayerSkin(playerid, 276); }
  56. else if(PlayerInfo[Pokanuvac[playerid]][pLeader] == 5) { PlayerInfo[playerid][pTeam] = 6; gTeam[playerid] = 6; ftext = "Yakuza"; ChosenSkin[playerid] = 121; SetPlayerSkin(playerid, 121); }
  57. else if(PlayerInfo[Pokanuvac[playerid]][pLeader] == 6) { PlayerInfo[playerid][pTeam] = 7; gTeam[playerid] = 7; ftext = "LCN"; ChosenSkin[playerid] = 112; SetPlayerSkin(playerid, 112); }
  58. else if(PlayerInfo[Pokanuvac[playerid]][pLeader] == 7) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Vlada"; ChosenSkin[playerid] = 164; SetPlayerSkin(playerid, 164); }
  59. else if(PlayerInfo[Pokanuvac[playerid]][pLeader] == 8) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Hitman"; ChosenSkin[playerid] = 20; SetPlayerSkin(playerid, 20); }
  60. else if(PlayerInfo[Pokanuvac[playerid]][pLeader] == 9) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Kanal 7"; ChosenSkin[playerid] = 1; SetPlayerSkin(playerid, 1); }
  61. else if(PlayerInfo[Pokanuvac[playerid]][pLeader] == 10) { PlayerInfo[playerid][pTeam] = 15; gTeam[playerid] = 15; ftext = "Taxi"; ChosenSkin[playerid] = 210; SetPlayerSkin(playerid, 210); }
  62. else if(PlayerInfo[Pokanuvac[playerid]][pLeader] == 11) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "LSG"; ChosenSkin[playerid] = 175; SetPlayerSkin(playerid, 175); }
  63. else if(PlayerInfo[Pokanuvac[playerid]][pLeader] == 12) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "GSF"; ChosenSkin[playerid] = 105; SetPlayerSkin(playerid, 105); }
  64. GetPlayerName(playerid, sendername, sizeof(sendername));
  65. PlayerInfo[playerid][pMember] = PlayerInfo[Pokanuvac[playerid]][pLeader];
  66. PlayerInfo[playerid][pRank] = 1;
  67. format(string, sizeof(string), "%s ja prifati ponudata za clenstvo.", sendername);
  68. ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  69. Pokana[playerid] = 1;
  70. SacuvajIgraca(playerid)
  71. }
  72. else
  73. {
  74. GetPlayerName(playerid, sendername, sizeof(sendername));
  75. format(string, sizeof(string), "%s ja odbi ponudata za clenstvo.", sendername);
  76. ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  77. Pokana[playerid] = 0;
  78. SacuvajIgraca(playerid)
  79. }
  80.  
  81. i ovo kod new .
  82. new Invite[MAX_PLAYERS];
  83. new Pokanet[MAX_PLAYERS];
  84. new Pokanuvac[MAX_PLAYERS];
  85. new Pokana[MAX_PLAYERS];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement