Guest User

Alkotest by Ceta

a guest
Jun 4th, 2017
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. YCMD:alkotest(playerid, params[], help)
  2. {
  3. #pragma unused help
  4. {
  5. if(IsACop(playerid))
  6. {
  7. new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME], giveplayerid, string[128];
  8. if(sscanf(params,"u",giveplayerid)) return SCM(playerid, COLOR_GREY, "Koriscenje: /alkotest [playerID/DeoImena]");
  9. new level = GetPlayerDrunkLevel(giveplayerid);
  10. GetPlayerName(playerid, sendername, sizeof(sendername));
  11. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  12. if(giveplayerid != INVALID_PLAYER_ID)
  13. {
  14. if(GetDistanceBetweenPlayers(playerid,giveplayerid) < 3)
  15. {
  16. if(level > 600)
  17. {
  18. format(string, sizeof(string), "* %s uzima alkohol test uredjaj i stavlja ga u %s'ova usta.", sendername ,giveplayer);
  19. CetaProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
  20. SCM(playerid, PURPLE, "** Alkohol Test Rezultat: Pozitivan **");
  21. GameTextForPlayer(playerid,"~y~Ovaj igrac je~n~~y~Pijan", 8000, 1);
  22. return 1;
  23. }
  24. else
  25. {
  26. format(string, sizeof(string), "* %s uzima alkohol test uredjaj i stavlja ga u %s'ova usta.", sendername ,giveplayer);
  27. CetaProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
  28. SCM(playerid, PURPLE, "** Alkohol Test Rezultat: Negativan **");
  29. GameTextForPlayer(playerid,"~y~Ovaj igrac ~n~~y~Nije pijan", 8000, 1);
  30. return 1;
  31. }
  32. }
  33. }
  34. }
  35. else
  36. {
  37. SCM(playerid, PURPLE, " Niste ovlasceni da koristite ovu komandu! (Cops Only)");
  38. }
  39. }
  40. return 1;
  41. }
Add Comment
Please, Sign In to add comment