Weapon cheat
#1

can you help me i neeed script like someone takes minigun for example and he got killed and write message don't cheat
Reply
#2

Assuming that 38 is the minigun reasonid..

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(reason == 38)
        {
        SendClientMessage(killerid, 0xFF00FFAA, "Don't Cheat foo'");
        }
    return 1;
}
Reply
#3

I cant script for shit, so dont take much advice from me but I think you would need something like this, I suck at editing others players games dont feel like learning their functions would rather build it myself.


Sellgun(int playerid, gun[])
{

int guncheck = 0; /// this would actually have to be a global to all of the what ever there called like onconnect disconnect. and then u would need to do a check for like each if(playergetgun)

string mp5 = ///id of it;
/// and so on.


if(playermats[id] < gun[])
{
GivePlayerGun(playerid)
//radius check

if(guncheck[id] != 1)
{
sendclientmessage("You cannot get this gun");
}

{

Or something like that.
Reply
#4

Quote:
Originally Posted by typedef
Sellgun(int playerid, gun[])
{

int guncheck = 0; /// this would actually have to be a global to all of the what ever there called like onconnect disconnect. and then u would need to do a check for like each if(playergetgun)

string mp5 = ///id of it;
/// and so on.


if(playermats[id] < gun[])
{
GivePlayerGun(playerid)
//radius check

if(guncheck[id] != 1)
{
sendclientmessage("You cannot get this gun");
}

{

Or something like that.
no offense, it's a concept, but that is probably the least consistent code i've ever seen :P
Reply
#5

pawn Код:
public AntiWeaponHack()
{
  for (new i = 0; i < MAX_PLAYERS; i++)
  {
    if (GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36 || GetPlayerWeapon(i) == 37 || GetPlayerWeapon(i) == 38)
    {
        Kick(i); // or change to ban, whatever you want it to do.
    }
  }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)