Advertisement
Matrix1

clear/check

Jun 24th, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.90 KB | None | 0 0
  1. //--------------------------------------------
  2. if(strcmp(cmd, "/clearkp", true) == 0)
  3. {
  4. if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Police
  5. {
  6. if (PlayerToPoint(1, playerid,1574.2909,-1646.2194,6.1109))
  7. {
  8. tmp = strtok(cmdtext, idx);
  9. if(!strlen(tmp))
  10. {
  11. SendClientMessage(playerid, COLOR_WHITE, "{FF8306}KORISTETE:{FFFFFF}/clearkp [ID/Ime na Igracot].");
  12. return 1;
  13. }
  14. giveplayerid = ReturnUser(tmp);
  15. if(IsPlayerConnected(giveplayerid))
  16. {
  17. if(giveplayerid != INVALID_PLAYER_ID)
  18. {
  19. if(ProxDetectorS(8.0, playerid, giveplayerid))
  20. {
  21. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  22. GetPlayerName(playerid, sendername, sizeof(sendername));
  23. format(string, sizeof(string), "{04D6FB}Gi iscistivte kaznenite poeni na igrac %s.", giveplayer);
  24. SendClientMessage(playerid, COLOR_WHITE, string);
  25. format(string, sizeof(string), "{04D6FB}%s vi gi iscisti Kaznetite Poeni.", sendername);
  26. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  27. PlayerInfo[giveplayerid][pRadar] = 0;
  28. new name[MAX_PLAYER_NAME];
  29. new string22[100+MAX_PLAYER_NAME];
  30. GetPlayerName(playerid, name, sizeof(name));
  31. format(string22, sizeof(string22), "%s gi iscisti kaznenite poeni na %s",sendername,giveplayer);
  32. PDSMS(COLOR_LIGHTBLUE,string22,1);
  33. }
  34. }
  35. return 1;
  36. }
  37. }
  38. else
  39. {
  40. SendClientMessage(playerid, COLOR_WHITE, "{FF4040}GRESKA:{FFFFFF}Ne ste vo Policija");
  41. }
  42. }
  43. }
  44. //------------------------------------------------------------------------------
  45. if(strcmp(cmd, "/checkkp", true) == 0)
  46. {
  47. if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Police
  48. {
  49. if (PlayerToPoint(1, playerid,1574.2909,-1646.2194,6.1109))
  50. {
  51. tmp = strtok(cmdtext,idx);
  52. if (!strlen(tmp))
  53. {
  54. SendClientMessage(playerid, COLOR_WHITE, "{FF8306}KORISTETE:{FFFFFF} /checkkp [ID/Ime na Igracot].");
  55. return 1;
  56. }
  57. giveplayerid = ReturnUser(tmp);
  58. if (giveplayerid == INVALID_PLAYER_ID)
  59. {
  60. SendClientMessage(playerid, COLOR_WHITE, "{FF4040}GRESKA:{FFFFFF}Nema takov igrac.");
  61. return 1;
  62. }
  63. if(PlayerInfo[giveplayerid][pRadar] >= 1)
  64. {
  65. GetPlayerName(playerid, sendername, sizeof(sendername));
  66. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  67. format(string, sizeof(string), "{04D6FB}%s ima %d/5 Kazneni poeni.", giveplayer, PlayerInfo[giveplayerid][pRadar]);
  68. SendClientMessage(playerid, COLOR_WHITE, string);
  69. new name[MAX_PLAYER_NAME];
  70. new string22[100+MAX_PLAYER_NAME];
  71. GetPlayerName(playerid, name, sizeof(name));
  72. format(string22, sizeof(string22), "%s proveruva kazneni poeni na %s, toj ima %d kazneni poeni",sendername,giveplayer,PlayerInfo[giveplayerid][pRadar]);
  73. PDSMS(COLOR_LIGHTBLUE,string22,1);
  74. }
  75. else
  76. {
  77. if(PlayerInfo[giveplayerid][pRadar] == 0)
  78. {
  79. GetPlayerName(playerid, sendername, sizeof(sendername));
  80. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  81. format(string, sizeof(string), "{04D6FB}%s nema Kazneni Poeni", giveplayer);
  82. SendClientMessage(playerid, COLOR_WHITE, string);
  83. new name[MAX_PLAYER_NAME];
  84. new string22[100+MAX_PLAYER_NAME];
  85. GetPlayerName(playerid, name, sizeof(name));
  86. format(string22, sizeof(string22), "%s proveruva kazneni poeni na %s, toj ima %d kazneni poeni",sendername,giveplayer,PlayerInfo[giveplayerid][pRadar]);
  87. PDSMS(COLOR_LIGHTBLUE,string22,1);
  88. }
  89. }
  90. }
  91. else
  92. {
  93. SendClientMessage(playerid, COLOR_WHITE, "{FF4040}GRESKA:{FFFFFF}Ne ste vo Policija");
  94. }
  95. }
  96. return 1;
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement