Author Topic: anti-minigun needed [pawn]  (Read 3012 times)

0 Members and 1 Guest are viewing this topic.

Offline A7Xsniper

  • Street Thug
  • *
  • Posts: 20
    • View Profile
anti-minigun needed [pawn]
« on: June 08, 2011, 02:56:31 am »
the tittle says it all i need anti-minigun please help me...
its for pawn

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: anti-minigun needed [pawn]
« Reply #1 on: June 08, 2011, 03:57:52 am »
Kicks the player for using a minigun.
[pawn]
public OnPlayerDeath(playerid, killerid, reason)
{
    if(reason == 33)
    {
        new szMsg[76], name[24];
        GetPlayerName(killerid, name, sizeof(name));

        format(szMsg, sizeof(szMsg), "[Auto-Kick] Kicking %s for using a minigun.", name);
        SendClientMessageToAll(0xFFFF00AA, szMsg);
        Kick(killerid);
        return 1;
    }
}
[/pawn]

You can replace Kick(killerid) with Ban(killerid) to ban them. Then you have to change the format() message so it says Banning instead of Kicking.
Do not PM me for support.




Offline A7Xsniper

  • Street Thug
  • *
  • Posts: 20
    • View Profile
Re: anti-minigun needed [pawn]
« Reply #2 on: June 08, 2011, 04:25:51 am »
can with a settimer() ??? ???

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: anti-minigun needed [pawn]
« Reply #3 on: June 08, 2011, 04:45:43 am »
There's no way for a server to see if someone has a minigun, at least until 0.4.
Do not PM me for support.