SA-MP Forums Archive
weired - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: weired (/showthread.php?tid=185253)



weired - dark_clown - 23.10.2010

hey, i have a anti weapon cheat but even if he dosnt have the weapons listed it sends a message
to admins sayign he does why??
pawn Код:
if(IsPlayerConnected(i) && PInfo[i][Level] >= 0)
        {
            GetPlayerWeaponData(i, 7, weap, ammo);
            if(weap == 38||37||26||27) {
                GetPlayerName(i,tname,sizeof(tname));
                format(string,sizeof(string),"INFO: %s has a minigun/flamethrower/shotgun", tname);
                MessageToAdmins(WHITE,string);
            }



Re: weired - Miguel - 24.10.2010

It's got to be like:
pawn Код:
if(IsPlayerConnected(i) && PInfo[i][Level] >= 0)
{
    GetPlayerWeaponData(i, 7, weap, ammo);
    if(weap == 38 || weap == 37 || weap == 26 || weap == 27)
    {
        GetPlayerName(i,tname,sizeof(tname));
        format(string,sizeof(string),"INFO: %s has a minigun/flamethrower/shotgun", tname);
        MessageToAdmins(WHITE,string);
    }
}
Or:
pawn Код:
if(IsPlayerConnected(i) && PInfo[i][Level] >= 0)
{
    GetPlayerWeaponData(i, 7, weap, ammo);
    switch(weap)
    {
        case 26, 27, 37, 38:
        {
            GetPlayerName(i,tname,sizeof(tname));
            format(string,sizeof(string),"INFO: %s has a minigun/flamethrower/shotgun", tname);
            MessageToAdmins(WHITE,string);     
        }
    }
}