Weapon Hacking :|
#1

I add this feature at my script. Then when i tried to get the weapons it says "im weapon hacking" it should not be.

How can i fix it please
Код:
CMD:vipweapon1(playerid, params[])
{
	if(PlayerInfo[playerid][pDonator] >= 1)
	{
	    if(IsPlayerInRangeOfPoint(playerid,5.0,-2656.4023,1415.4473,906.2734))
	    {
             GivePlayerWeapon(playerid, 1, 999999999);
             GivePlayerWeapon(playerid, 25, 999999999);
             GivePlayerWeapon(playerid, 23, 999999999);
             GivePlayerWeapon(playerid, 28, 999999999);
             GivePlayerWeapon(playerid, 30, 999999999);
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have receive the VIP weapon slot 1");
	    }
		else
		{
			return SendClientMessage(playerid, COLOR_WHITE, "You are not range in VIP Weapon Slot 1 !");
		}
	}
	else
	{
		return SendClientMessage(playerid, COLOR_WHITE, "Only VIP Can use this command!");
	}
	return 1;
}

CMD:vipweapon2(playerid, params[])
{
	if(PlayerInfo[playerid][pDonator] >= 1)
	{
	    if(IsPlayerInRangeOfPoint(playerid,5.0,-2656.7061,1405.1819,906.2734))
	    {
			 GivePlayerWeapon(playerid, 5, 999999999);
             GivePlayerWeapon(playerid, 24, 999999999);
             GivePlayerWeapon(playerid, 29, 999999999);
             GivePlayerWeapon(playerid, 27, 999999999);
             GivePlayerWeapon(playerid, 31, 999999999);
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have receive the VIP weapon slot 2");
	    }
		else
		{
			return SendClientMessage(playerid, COLOR_WHITE, "You are not range in VIP Weapon slot 2!");
		}
	}
	else
	{
		return SendClientMessage(playerid, COLOR_WHITE, "Only VIP Can use this command!");
	}
	return 1;
}

CMD:vipweapon3(playerid, params[])
{
	if(PlayerInfo[playerid][pDonator] >= 1)
	{
	    if(IsPlayerInRangeOfPoint(playerid,5.0,-2662.2383,1405.1818,906.2734))
	    {
	    
             GivePlayerWeapon(playerid, 6, 999999999);
             GivePlayerWeapon(playerid, 22, 999999999);
             GivePlayerWeapon(playerid, 26, 999999999);
             GivePlayerWeapon(playerid, 29, 999999999);
             GivePlayerWeapon(playerid, 33, 999999999);
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have receive the VIP weapon slot 3");
	    }
		else
		{
			return SendClientMessage(playerid, COLOR_WHITE, "You are not range in VIP Weapon slot 3!");
		}
	}
	else
	{
		return SendClientMessage(playerid, COLOR_WHITE, "Only VIP Can use this command!");
	}
	return 1;
}

CMD:vipweapon4(playerid, params[])
{
	if(PlayerInfo[playerid][pDonator] >= 1)
	{
	    if(IsPlayerInRangeOfPoint(playerid,5.0,-2662.0974,1415.4474,906.2734))
	    {
  			 GivePlayerWeapon(playerid, 42, 999999999);
             GivePlayerWeapon(playerid, 34, 999999999);
             GivePlayerWeapon(playerid, 43, 999999999);
             GivePlayerWeapon(playerid, 49, 999999999);
             GivePlayerWeapon(playerid, 31, 999999999);
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have receive the VIP weapon slot 4");
	    }
		else
		{
			return SendClientMessage(playerid, COLOR_WHITE, "You are not range in VIP Weapon slot 4!");
		}
	}
	else
	{
		return SendClientMessage(playerid, COLOR_WHITE, "Only VIP Can use this command!");
	}
	return 1;
}
Код:
stock ExecuteHackerAction(playerid, weaponid)
{
	if(!gPlayerLogged[playerid]) { return 1; }
	if(PlayerInfo[playerid][pTut] == 0) { return 1; } // NOT IMPLEMENTED YET
	if(playerTabbed[playerid] == 1) { return 1; }
	if(GetPVarInt(playerid, "PBM") > 0) { return 1; }

	new String[ 128 ], WeaponName[ 128 ];
	GetWeaponName(weaponid, WeaponName, sizeof(WeaponName));

	format(String, sizeof(String), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) may possibly be weapon hacking (%s).", GetPlayerNameEx(playerid), playerid, WeaponName);
	ABroadCast(COLOR_YELLOW, String, 2);

	SetPVarInt(playerid, "wpH", GetPVarInt(playerid, "wpH")+1);

	if(GetPVarInt(playerid, "wpH") >= 3) {
		format(String, sizeof(String), "%s may possibly be weapon hacking (%s).", GetPlayerNameEx(playerid), WeaponName);
		AddAutomatedFlag(playerid, String);
	}

	//format(String, sizeof(String), "%s (ID %d) may possibly be weapon hacking (%s)", GetPlayerNameEx(playerid), playerid, WeaponName);
	//Log("logs/hack.log", String);
	return 1;
}
Reply
#2

Put a variable?

pawn Код:
new HasVipWeapons[MAX_PLAYERS];
at the top

pawn Код:
HasVipWeapons[playerid] = 1;
when they type the command just add it under GivePlayerWeapon for each command

and for the check put
pawn Код:
if(HasVipWeapons[playerid] == 0)
{
    new String[ 128 ], WeaponName[ 128 ];
    GetWeaponName(weaponid, WeaponName, sizeof(WeaponName));

    format(String, sizeof(String), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) may possibly be weapon hacking (%s).", GetPlayerNameEx(playerid), playerid, WeaponName);
    ABroadCast(COLOR_YELLOW, String, 2);

    SetPVarInt(playerid, "wpH", GetPVarInt(playerid, "wpH")+1);

    if(GetPVarInt(playerid, "wpH") >= 3)
    {
        format(String, sizeof(String), "%s may possibly be weapon hacking (%s).", GetPlayerNameEx(playerid), WeaponName);
        AddAutomatedFlag(playerid, String);
    }

    //format(String, sizeof(String), "%s (ID %d) may possibly be weapon hacking (%s)", GetPlayerNameEx(playerid), playerid, WeaponName);
    //Log("logs/hack.log", String);
}
Or something like that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)