0.3e anti cheat?
#1

hello im making a admin FS and in a weapon dialog when i spawn a mini gun the server kicks me

so i dont know if its a problem with the script or 0.3e has a built in anti cheat

here is my code
pawn Код:
if (strcmp("/weps", cmdtext, true, 10) == 0)
    {
        if(!IsPlayerAdmin(playerid)) return 0;
        }
     ShowPlayerDialog(playerid, DIALOGW, DIALOG_STYLE_LIST, "{FF0000}weapons", "{00FF00}9mm\n{00FF00}Silenced 9mm\n{00FF00}Desert Eagle\n{00FF00}Tec-9\n{00FF00}Micro SMG\n{00FF00}SMG\n{00FF00}Shotgun\n{00FF00}Sawnoff Shotgun\n{00FF00}Combat Shotgun\n{00FF00}M4\n{00FF00}Ak47\n{00FF00}Sniper Rifle\n{00FF00}Molotov Cocktail\n{00FF00}Grenade\n{00FF00}Remote Explosives\n{00FF00}Mini Gun\n{00FF00}Rocket Launcher", "ok", "cancel");
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
    {
    if(dialogid == DIALOGW)
    {
    if(response)
    {
    switch(listitem)// Checking which listitem was selected
            {
                case 0:
                {
                    GivePlayerWeapon(playerid, 22, 1000);
                   
                }
                case 1:
                {

                   
                    GivePlayerWeapon(playerid, 23, 1000);
                }
                case 2:
                {
                   

                    GivePlayerWeapon(playerid, 24, 1000);
                }
                  case 3:
                {


                    GivePlayerWeapon(playerid, 32, 1000);
                }
                  case 4:
                {


                    GivePlayerWeapon(playerid, 28, 1000);
                }
                  case 5:
                {


                    GivePlayerWeapon(playerid, 29, 1000);
                }
                  case 6:
                {


                    GivePlayerWeapon(playerid, 25, 1000);
                }
                case 7:
                {


                    GivePlayerWeapon(playerid, 26, 1000);
                }
                case 8:
                {


                    GivePlayerWeapon(playerid, 27, 1000);
                }
                case 9:
                {


                    GivePlayerWeapon(playerid, 31, 1000);
                }
                case 10:
                {


                    GivePlayerWeapon(playerid, 30, 1000);
                }
                case 11:
                {


                    GivePlayerWeapon(playerid, 34, 1000);
                }
                case 12:
                {


                    GivePlayerWeapon(playerid, 18, 1000);
                }
                case 13:
                {


                    GivePlayerWeapon(playerid, 16, 1000);
                }
                case 14:
                {


                    GivePlayerWeapon(playerid, 39, 1000);
                }
                case 15:
                {


                    GivePlayerWeapon(playerid, 38, 1000);
                }
                case 16:
                {


                    GivePlayerWeapon(playerid, 35, 1000);

            }
            }

     }  }
 }
    return 1;
Reply
#2

Command mistake?
PHP код:
if (strcmp("/weps"cmdtexttrue10) == 0)
{
    if(!
IsPlayerAdmin(playerid)) return 0;
    else {
    
ShowPlayerDialog(playeridDIALOGWDIALOG_STYLE_LIST"{FF0000}weapons""{00FF00}9mm\n{00FF00}Silenced 9mm\n{00FF00}Desert Eagle\n{00FF00}Tec-9\n{00FF00}Micro SMG\n{00FF00}SMG\n{00FF00}Shotgun\n{00FF00}Sawnoff Shotgun\n{00FF00}Combat Shotgun\n{00FF00}M4\n{00FF00}Ak47\n{00FF00}Sniper Rifle\n{00FF00}Molotov Cocktail\n{00FF00}Grenade\n{00FF00}Remote Explosives\n{00FF00}Mini Gun\n{00FF00}Rocket Launcher""ok""cancel");
    }
    return 
1;

Never worked with strcmp, so please don't kick my ass, but should look something like this, because you're adding the showplayerdialog outside of the public, and not inside.
Reply
#3

The 0.3e doesn't have an in-built AntiCheat.Maybe you're editing some gamemode and you don't know there is ALREADY an anticheat on there.

Search for "anticheat" - "Kick(playerid);" - "Minigun" - "Forbidden Weapon(s)" and other tags.
Reply
#4

didnt work lol 26 errors i think cause a misplced braket but thanks anyway
Reply
#5

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
The 0.3e doesn't have an in-built AntiCheat.Maybe you're editing some gamemode and you don't know there is ALREADY an anticheat on there.

Search for "anticheat" - "Kick(playerid);" - "Minigun" - "Forbidden Weapon(s)" and other tags.
im not looking for an anti cheat im saying its like there is an anti cheat in it (which i dont think there is) as it kicks me on spawning minigun
Reply
#6

Well, and your OnPlayerDialogResponse have a big mistake, since you don't have "switch(dialogid);"
https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#7

Try this:

pawn Код:
if(strcmp("/weps", cmdtext, true, 10) == 0)
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You are not an Admin!");
    else
{
     ShowPlayerDialog(playerid, DIALOGW, DIALOG_STYLE_LIST, "{FF0000}weapons",
     "{00FF00}9mm\n{00FF00}Silenced 9mm\n{00FF00}Desert Eagle\n{00FF00}Tec-9\n{00FF00}
     Micro SMG\n{00FF00}SMG\n{00FF00}Shotgun\n{00FF00}Sawnoff Shotgun\n{00FF00}
     Combat Shotgun\n{00FF00}M4\n{00FF00}Ak47\n{00FF00}Sniper Rifle\n{00FF00}
     MolotovCocktail\n{00FF00}Grenade\n{00FF00}Remote Explosives\n{00FF00}Mini Gun\n{00FF00}
     Rocket Launcher"
, "ok", "cancel");
}
return 1;
Reply
#8

well i added switch(dialogid) and have same prob

thanks sniper
Reply
#9

@kikito,the dialog problem is not related to the minigun kick.

@thefatshizms,as i said before,search for that tags and remove the part of code where kicks the player if has a minigun.
Reply
#10

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
@kikito,the dialog problem is not related to the minigun kick.

@thefatshizms,as i said before,search for that tags and remove the part of code where kicks the player if has a minigun.
I know that the dialog is not related, just trying to keep his code clean
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)