Advertisement
Matrix1

/unprison

Jun 14th, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. if(strcmp(cmd, "/unprison", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. tmp = strtok(cmdtext, idx);
  6. if(!strlen(tmp))
  7. {
  8. SendClientMessage(playerid, COLOR_WHITE, "{FF8306}KORISTETE:{FFFFFF}/unprison [ID/Ime na Igrac] [minuti]");
  9. }
  10. new playa;
  11. playa = ReturnUser(tmp);
  12. tmp = strtok(cmdtext, idx);
  13. if (PlayerInfo[playerid][pAdmin] >= 3)
  14. {
  15. if(IsPlayerConnected(playa))
  16. {
  17. if(playa != INVALID_PLAYER_ID)
  18. {
  19. GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  20. GetPlayerName(playerid, sendername, sizeof(sendername));
  21. new length = strlen(cmdtext);
  22. while ((idx < length) && (cmdtext[idx] <= ' '))
  23. {
  24. idx++;
  25. }
  26. new offset = idx;
  27. new result[128];
  28. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  29. {
  30. result[idx - offset] = cmdtext[idx];
  31. idx++;
  32. }
  33. result[idx - offset] = EOS;
  34. if(!strlen(result))
  35. {
  36. SendClientMessage(playerid, COLOR_WHITE, "{FF8306}KORISTETE:{FFFFFF}/unprison [ID/Ime na Igrac] [pricina].");
  37. return 1;
  38. }
  39. format(string, sizeof(string), "{6EF83C}INFO:{FFFFFF}Go izvadivte %s od Demir Hisar", giveplayer);
  40. SendClientMessage(playerid, WHITE, string);
  41. SafeResetPlayerWeapons(playa);
  42. WantedPoints[playa] = 0;
  43. PlayerInfo[playa][pJailed] = 0;
  44. PlayerInfo[playa][pJailTime] = 0;
  45. SetPlayerInterior(playa, 6);
  46. PlayerInfo[playa][pInt] = 6;
  47. SetPlayerWorldBounds(giveplayerid, 20000.0000,-20000.0000,20000.0000,-20000.0000);
  48. SetPlayerPos(giveplayerid, 246.8439,70.0776,1003.6406);
  49. format(string, sizeof(string), "{6EF83C}INFO:{FFFFFF}Izvadeni ste od Demir Hisar od Admin %s", sendername);
  50. SendClientMessage(playa, COLOR_WHITE, string);
  51. printf("%s",string);
  52. }
  53. }
  54. }
  55. else
  56. {
  57. SendClientMessage(playerid, WHITE, "{FF4040}GRESKA:{FFFFFF}Nemozete da ja koristite ovaa komanda.");
  58. }
  59. }
  60. return 1;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement