Guest User

Untitled

a guest
Jul 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. // 10:07 04.04.2012 Orakel/Siedler
  2. #include <a_samp>
  3.  
  4. enum wr_enum {
  5. wr_name[64],
  6. wr_count
  7. };
  8.  
  9. static const WantedReason[][wr_enum] = {
  10. {"Angriff/Beschuss", 2},
  11. {"Flucht", 2},
  12. {"Verweigerung", 1},
  13. {"Beihilfe z. Flucht", 2}
  14. };
  15.  
  16. public OnPlayerClickPlayer(playerid, clickedplayerid, source) {
  17. if(playerid==clickedplayerid) return 0;
  18. if(IsACop(playerid)){
  19. SetPVarInt(playerid, "clickedid", clickedplayerid);
  20. new string[128], bigstring[768], giveplayer[MAX_PLAYER_NAME];
  21. GetPlayerName(clickedplayerid, giveplayer, sizeof(giveplayer));
  22. format(string, sizeof(string), "Spieler: %s, Aktuelles Wanted Level: %d", giveplayer, WantedLevel[clickedplayerid]);
  23. for(new i = 0; i < sizeof(WantedReason); i++){
  24. format(bigstring, sizeof(bigstring), "%s (%d)\n", WantedReason[i][wr_name]);
  25. }
  26. ShowPlayerDialog(playerid, 555, DIALOG_STYLE_LIST, string, bigstring, "OK", "Abbruch");
  27. }
  28. return 1;
  29. }
  30.  
  31. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
  32. new string[128] giveplayer[MAX_PLAYER_NAME];
  33. switch(dialogid) {
  34. case: 555 {
  35. if(!IsACop(playerid))return 0;
  36. for(new i = 0; i < sizeof(WantedReason); i++) {
  37. if(listitem==i)
  38. {
  39. new criminal = GetPVarInt(i, "clickedid");
  40. GetPlayerName(criminal, giveplayer, sizeof(giveplayer));
  41. PlayerInfo[criminal][pCrimes] += 1;
  42. WantedPoints[criminal] += (WantedReason[i][wr_count]*2);
  43. WantedLevel[criminal] += WantedReason[i][wr_count];
  44. SetPlayerCriminal(criminal, playerid, WantedReason[i][wr_name]);
  45. format(string,sizeof(string),"Du hast den Spieler %s %d Wanted/s wegen %s ausgestellt.", giveplayer, WantedReason[i][wr_count], WantedReason[i][wr_name]);
  46. SendClientMessage(playerid,COLOR_YELLOW, string);
  47. return 1;
  48. }
  49. }
  50. }
  51. }
  52. return 1;
  53. }
Add Comment
Please, Sign In to add comment