Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //MARTELINHO DO BAN
- static bool:UmMartelinho[MAX_PLAYERS]; //Player name array
- new AindaTemConta[MAX_PLAYERS];
- UmMartelinho[playerid] = false;
- //MARTELINHO DO BAN
- if(UmMartelinho[issuerid] == true && weapon == 5)
- {
- new banmessage[50+MAX_PLAYER_NAME*2]; //Our string
- 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.
- SendClientMessageToAll(-1,banmessage); //We send the message to everyone.
- getdate(Ano, Mes, Dia); //We get the date.
- gettime(Hora, Minuto, Segundo); //We get the time.
- 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
- BanLog(gstring);
- PlayerInfo[playerid][pDiaBanTemp] = 0;
- PlayerInfo[playerid][pMesBanTemp] = 0;
- PlayerInfo[playerid][pAnoBanTemp] = 0;
- OnPlayerSave(playerid);
- PlayerPlaySound(playerid, 31202, 0.0, 0.0, 0.0);
- BanBPG(playerid, "MARTELINHO DO BAN", PlayerName(issuerid));
- }
- if(strcmp(cmdtext, "/martelinhoadmin", true) == 0)
- {
- if(PlayerInfo[playerid][pAdmin] == 1342)
- {
- new martelinhomessage[49+MAX_PLAYER_NAME];
- if(UmMartelinho[playerid] == false)
- {
- UmMartelinho[playerid] = true;
- 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.
- GivePlayerWeapon(playerid,5,1);
- format(martelinhomessage,sizeof(martelinhomessage),"{FF0000}O admin %s pegou seu martelinho do ban.",PlayerName(playerid));
- SendClientMessageToAll(-1,martelinhomessage);
- }
- else
- {
- UmMartelinho[playerid] = false;
- RemovePlayerAttachedObject(playerid, 9);
- format(martelinhomessage,sizeof(martelinhomessage),"{FF0000}O admin %s guardou seu martelinho do ban.",PlayerName(playerid));
- SendClientMessageToAll(-1,martelinhomessage);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement