Guest User

Untitled

a guest
Apr 13th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. if(strcmp(cmd, "/maskon", true) == 0)
  2. {
  3. if(GetPVarInt(playerid, "pMask") == 0)
  4. {
  5. SendClientMessage(playerid, COLOR_RED, "Nemas masku!");
  6. return 1;
  7. }
  8. if(PlayerInfo[playerid][pLevel] < 3)
  9. {
  10. SendClientMessage(playerid, COLOR_RED, "Moras biti level 3.");
  11. return 1;
  12. }
  13. if(GetPVarInt(playerid, "Maskuse") != 0)
  14. {
  15. SendClientMessage(playerid, COLOR_RED, "Vec imas masku na glavi!");
  16. return 1;
  17. }
  18. foreach(Player, i)
  19. {
  20. if(IsPlayerConnected(i))
  21. {
  22. ShowPlayerNameTagForPlayer(i, playerid, 0);
  23. }
  24. }
  25. SetPVarInt(playerid, "Maskuse", 1);
  26. SendClientMessage(playerid, COLOR_WHITE, "Stavili ste masku na glavu [/maskoff da ju skinete].");
  27. GetPlayerName(playerid, sendername, sizeof(sendername));
  28. format(string, sizeof(string), "* %s stavlja masku na glavu. (( ID Maske: %d ))", sendername, GetPVarInt(playerid, "MaskID"));
  29. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  30. new year, month,day;
  31. getdate(year, month, day);
  32. format(string, sizeof(string), "(%d-%d-%d) %s je stavio masku na glavu. (( ID Maske: %d ))", month, day, year, sendername, GetPVarInt(playerid, "MaskID"));
  33. MaskLog(string);
  34. return 1;
  35. }
  36.  
  37. if(strcmp(cmd, "/maskoff", true) == 0)
  38. {
  39. if(GetPVarInt(playerid, "pMask") == 0)
  40. {
  41. SendClientMessage(playerid, COLOR_RED, "Nemas masku!");
  42. return 1;
  43. }
  44. if(PlayerInfo[playerid][pLevel] < 3)
  45. {
  46. SendClientMessage(playerid, COLOR_RED, "Moras biti level 3.");
  47. return 1;
  48. }
  49. if(GetPVarInt(playerid, "Maskuse") != 1)
  50. {
  51. SendClientMessage(playerid, COLOR_RED, "Nemas masku na glavi!");
  52. return 1;
  53. }
  54. foreach(Player, i)
  55. {
  56. if(IsPlayerConnected(i))
  57. {
  58. ShowPlayerNameTagForPlayer(i, playerid, 1);
  59. }
  60. }
  61. SetPVarInt(playerid, "Maskuse", 0);
  62. SendClientMessage(playerid, COLOR_WHITE, "Skinuli ste masku [/maskon da ju vratite na glavu].");
  63. GetPlayerName(playerid, sendername, sizeof(sendername));
  64. format(string, sizeof(string), "* %s skida masku sa glave. (( ID Maske: %d ))", sendername, GetPVarInt(playerid, "MaskID"));
  65. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  66. return 1;
  67. }
Advertisement
Add Comment
Please, Sign In to add comment