Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. //MARTELINHO DO BAN
  2. static bool:UmMartelinho[MAX_PLAYERS]; //Player name array
  3. new AindaTemConta[MAX_PLAYERS];
  4.  
  5.  
  6. UmMartelinho[playerid] = false;
  7.  
  8.  
  9.  
  10. //MARTELINHO DO BAN
  11. if(UmMartelinho[issuerid] == true && weapon == 5)
  12. {
  13. new banmessage[50+MAX_PLAYER_NAME*2]; //Our string
  14. format(banmessage,sizeof(banmessage),"{FF0000}O admin %s baniu %s com seu martelinho do ban.",PlayerName(issuerid),PlayerName(playerid)); //We format it with the player and victim's name.
  15. SendClientMessageToAll(-1,banmessage); //We send the message to everyone.
  16. getdate(Ano, Mes, Dia); //We get the date.
  17. gettime(Hora, Minuto, Segundo); //We get the time.
  18. format(gstring, sizeof(gstring), "[%04d/%02d/%02d - %02d:%02d:%02d] %s baniu %s com seu martelinho do ban\r\n", Ano, Mes, Dia, Hora, Minuto, Segundo, PlayerName(issuerid),PlayerName(playerid)); //We format the string
  19. BanLog(gstring);
  20. PlayerInfo[playerid][pDiaBanTemp] = 0;
  21. PlayerInfo[playerid][pMesBanTemp] = 0;
  22. PlayerInfo[playerid][pAnoBanTemp] = 0;
  23. OnPlayerSave(playerid);
  24. PlayerPlaySound(playerid, 31202, 0.0, 0.0, 0.0);
  25. BanBPG(playerid, "MARTELINHO DO BAN", PlayerName(issuerid));
  26. }
  27.  
  28.  
  29.  
  30. if(strcmp(cmdtext, "/martelinhoadmin", true) == 0)
  31. {
  32. if(PlayerInfo[playerid][pAdmin] == 1342)
  33. {
  34. new martelinhomessage[49+MAX_PLAYER_NAME];
  35. if(UmMartelinho[playerid] == false)
  36. {
  37. UmMartelinho[playerid] = true;
  38. SetPlayerAttachedObject(playerid, 9, 18635, 6, -0.211000, -0.093999, 0.000000, 4.699998, 8.100019, -0.500001, 3.759002, 4.369003, 2.290000); //We attach the martelinho object in the player's right hand.
  39. GivePlayerWeapon(playerid,5,1);
  40. format(martelinhomessage,sizeof(martelinhomessage),"{FF0000}O admin %s pegou seu martelinho do ban.",PlayerName(playerid));
  41. SendClientMessageToAll(-1,martelinhomessage);
  42. }
  43. else
  44. {
  45. UmMartelinho[playerid] = false;
  46. RemovePlayerAttachedObject(playerid, 9);
  47. format(martelinhomessage,sizeof(martelinhomessage),"{FF0000}O admin %s guardou seu martelinho do ban.",PlayerName(playerid));
  48. SendClientMessageToAll(-1,martelinhomessage);
  49. }
  50. }
  51. return 1;
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement