Help with Minigun Antihack
#1

Guys i need a code that when someone spawn a minigun with hack program wil not spawn the gun and will say "don't try to hack" any help?
Reply
#2

you can improve on this
pawn Код:
OnPlayerUpdate(playerid)
{
    if(GetPlayerWeapon(playerid) == 38)
    {
        SendClientMessage(playerid,0xFFFFFFFF,"OMG PLZ NO CHITTING MINIGUNZ");
        ResetPlayerWeapons(playerid);
    }
}
Reply
#3

Quote:
Originally Posted by cessil
Посмотреть сообщение
you can improve on this
pawn Код:
OnPlayerUpdate(playerid)
{
    if(GetPlayerWeapon(playerid) == 38)
    {
        SendClientMessage(playerid,0xFFFFFFFF,"OMG PLZ NO CHITTING MINIGUNZ");
        ResetPlayerWeapons(playerid);
    }
}
if i put this on gamemode, will this work when someone spawn it from hack program?
Reply
#4

pawn Код:
OnPlayerUpdate(playerid)
{
    if(GetPlayerWeapon(playerid) == 38)
    {
        SendClientMessage(playerid,0xFFFFFFFF,"JunkBuster: You have been banned for Minigum Cheating");
        Ban(playerid);
    }
}
Reply
#5

Use a timer in stead of OnPlayerUpdate,
and use GetPlayerWeaponData in stead of GetPlayerWeapon.
Reply
#6

and learn how to script instead of getting other peoples and copy + pasting it all
Reply
#7

Quote:
Originally Posted by cessil
Посмотреть сообщение
and learn how to script instead of getting other peoples and copy + pasting it all
Yea, but he need to learn how to script, and asking is the best way to learn. Thats how i learned a lot of scripting - here.
Reply
#8

right, but if he doesn't understand what a function does and pastes it in anyway then how is he learning?
Reply
#9

Quote:
Originally Posted by cessil
Посмотреть сообщение
right, but if he doesn't understand what a function does and pastes it in anyway then how is he learning?
Yea, but that must be his problem
Reply
#10

You can create a zone with incognito plugin and do this.

pawn Код:
if (IsPlayerInDynamicArea(playerid, Zone) && GetPlayerWeapon(playerid) > 0))
{
  SendClientMessage(playerid, COLOR, "You can't use arms in this zone");
  SetPlayerArmedWeapon(playerid, 0);
  }
  return 1;
}
Or good, use only this.

pawn Код:
public OnPlayerUpdate(playerid)
{
 if(GetPlayerWeapon(playerid) == 38)
{
 SendClientMessage(playerid, COLOR, "U can't use this arm :B lol");
}
}
 return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)