SA-MP Forums Archive
Jetpack bug - 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)
+--- Thread: Jetpack bug (/showthread.php?tid=602778)



Jetpack bug - kevi11 - 12.03.2016

Guys I added to / aduty that made me a user in this forum, and I added that when I do I cmd adds the jetpack, but when I take the jetpack banna me because there anticheat how can I do?


Script:

CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] < 1) return SendClientMessage(playerid, COLOR_RED, "Solo gli admin +1 possono utilizzare questo comando.");
if(PlayerInfo[playerid][pAdminLevel] >= 1 && IsOnduty{playerid} == 0)
{
IsOnduty{playerid} = 1;
SetPlayerHealth(playerid,9999999.0);
SetPlayerArmour(playerid,9999999.0);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
}
else if( IsOnduty{playerid} == 1)
{
IsOnduty{playerid} = 0;
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
}
return 1;
}


Re: Jetpack bug - YouServ - 12.03.2016

Disable your anticheat for "playerid" ? Who anticheat yo use ?


Re: Jetpack bug - YoussefHammad - 12.03.2016

in your anticheat add
Код:
if(IsOnduty{playerid} != 0)return 1;
tell me if it doesnt work
EDIT: check if the playerid is between () or {} , if {} doesnt work switch them to ()


Re: Jetpack bug - kevi11 - 12.03.2016

ty u so much


Re: Jetpack bug - kevi11 - 12.03.2016

No, wait Admcmd ban me again.


Re: Jetpack bug - Joron - 12.03.2016

Quote:
Originally Posted by YoussefHammad
Посмотреть сообщение
in your anticheat add
Код:
if(IsOnduty{playerid} != 0)return 1;
tell me if it doesnt work
EDIT: check if the playerid is between () or {} , if {} doesnt work switch them to ()
This should work.


Re: Jetpack bug - YoussefHammad - 12.03.2016

can u send the part of your anti-cheat that bans players for forbidden items/weapons ?


Re: Jetpack bug - Joron - 12.03.2016

Quote:
Originally Posted by YoussefHammad
Посмотреть сообщение
can u send the part of your anti-cheat that bans players for forbidden items/weapons ?
What actually bans players for this is OnPlayerUpdate
Quote:
PHP код:
public OnPlayerUpdate(playerid)
{
    
// Ban players if they have a jetpack
    
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
    {
        
Ban(playerid);
    }
    return 
1;




Re: Jetpack bug - YoussefHammad - 12.03.2016

if thats really the code then
Код:
public OnPlayerUpdate(playerid) 
{ 
    // Ban players if they have a jetpack 
    if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) 
    { 
        if(IsOnduty{playerid} == 0)
        {
            Ban(playerid); 
        }
    } 
    return 1; 
}
should work just fine , still reply if it doesnt work


Re: Jetpack bug - saffierr - 13.03.2016

Or if you want it disabled for all your admins use this
PHP код:
public OnPlayerUpdate(playerid

    
// Ban players if they have a jetpack 
    
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK
    { 
        if(
PlayerInfo[playerid][pAdmin] == 0)
        {
            
Ban(playerid); 
        }
    } 
    return 
1