My 1st Include Attempt Results In Epic Fail :(
#8

Just incase your interested this is how it would be with y_hooks, see if this works better for what you want (without errors hopefully). I'v not tested it but should work.
pawn Код:
//By Weponz For Vegas CNR Server
//Full Credits To: Kwarde //Complete Tutorial

#include <a_samp>
#include <YSI/y_hooks>

#define WHITE     0xFFFFFFAA

new pMoney[MAX_PLAYERS];
new ForbiddenWeapons[][] = {
    16, //Grenades
    34, //Sniper Rifle
    37, //Flamethrower
    38, //Minigun
    39, //Satchel
    35, //RPG
    36, //Heatseeking RPG
    44, //Nightvision Goggles
    45 //Thermal Goggles
};

Hook:FSinit_OnPlayerConnect(playerid)//you can swap "FSinit" for whatever name you like (no keywords obviously)
{
    pMoney[playerid] = 0;
    return 1;
}
Hook:PlayerDc_OnPlayerDisconnect(playerid, reason)//you can swap all these names just not the callback part (after the underscore)
{
    pMoney[playerid] = 0;
    return 1;
}
Hook:PlayerUpdate_OnPlayerUpdate(playerid)
{
    new pName[MAX_PLAYER_NAME], w = 0, string[128];

    if(GetPlayerMoney(playerid) > pMoney[playerid]){
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "[VEGAS-BOT]: %s Has Been Banned From The Server! [Cheats Detected]", pName);
        SendClientMessageToAll(WHITE, string);
        BanEx(playerid, "[Cheats Detected]: Money Hax");
    }
    while(w < (sizeof(ForbiddenWeapons))){
        if(GetPlayerWeapon(playerid) == w){
            GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
            format(string, sizeof(string), "[VEGAS-BOT]: %s Has Been Banned From The Server! [Cheats Detected]", pName);
            SendClientMessageToAll(WHITE, string);
            BanEx(playerid, "[Cheats Detected]: Weapon Hax");
        }
    }
    return 1;
}
stock a_GivePlayerMoney(playerid, money)
{
    pMoney[playerid] += money;
    GivePlayerMoney(playerid, money);
}
stock a_SetPlayerMoney(playerid, money)
{
    pMoney[playerid] = money;
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid);
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)