Someone gets banned with certain weapon.
#1

so, say they have a minigun, how they get banned?

Код:
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
SendClientMessage(COLOR_RED, "Hi there, you have been banned for jetpack hacks");
Ban(playerid); // Ban players if they have a jetpack
}
thats my code for jetpack, could i change SPECIAL_ACTION to like, WEAPON_MINIGUN?
Reply
#2

pawn Код:
weaponid = GetPlayerWeapon(i);


if(weaponid == 38)
{
  new string[128];
  new plname[MAX_PLAYER_NAME];
  GetPlayerName(i, plname, sizeof(plname));
  format(string, 256, "%s [%d] Just spawned a minigun and got banned.",GetPlayerNameEx(i),i);
  AdministratorMessage(COLOR_RED,string,1);
  Ban(i);
  return 1;
}
then put it in a timer or something.

//
Remember to put this in :P
for(new i=0; i<MAX_PLAYERS; i++)
Reply
#3

Try this:
Код:
public OnPlayerUpdate(playerid)
{
  new weaponid;
  weaponid = GetPlayerWeapon(playerid);
  if(weaponid == 38)
  {
     SendClientMessage(playerid, 0xFF0000AA,"You have been banned for Minigun Hacks.");
     Ban(playerid);
  }
  return 1;
}
It will send that message to the Hacker and Ban him when he spawns a minigun.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)