Hi i just finished up some problems, i thought i would make i new topic so others can find it.
Here it is, the beginning of Security for script enabled servers.
Hope it evolves from here, i will be posting more, because i really hate cheaters. especially those with aim bots.
For some reason i cant post in Release so that is why i am posting it here.
This will check if the user is using weapons you want them to use.
internal status.
public static bool weaponFound;
Function.
public async void allowedWeaponsCheck()
{
int CombatMG = GetHashKey("weapon_CombatMG");
int CarbineRifle = GetHashKey("weapon_CarbineRifle");
int HeavySniper = GetHashKey("weapon_heavysniper");
int Pistol = GetHashKey("weapon_pistol");
int weaponPlayer = GetSelectedPedWeapon(GetPlayerPed(PlayerId()));
string weaponUser = weaponPlayer.ToString().Replace("-", "");
int ignoreWeapon = 0;
int ignoreWeapon1 = 1569615261;
int ignoreWeapon2 = 453432689;
int[] weaponList1 = { CombatMG, CarbineRifle, HeavySniper, Pistol, ignoreWeapon, ignoreWeapon1, ignoreWeapon2 };
foreach (int x in weaponList1)
{
if (weaponPlayer == x)
{
weaponFound = true;
}
}
await Delay(100);
}
async task.
weaponFound = false;
allowedWeaponsCheck();
if (weaponFound == false && GetSelectedPedWeapon(GetPlayerPed(PlayerId())) != 0 && GetSelectedPedWeapon(GetPlayerPed(PlayerId())) != 1569615261 && GetSelectedPedWeapon(GetPlayerPed(PlayerId())) != 453432689)
{
weaponFound = true;
Screen.ShowNotification("Weapon not allowed " + GetSelectedPedWeapon(GetPlayerPed(PlayerId())).ToString().Replace("-", ""));
RemoveWeaponFromPed(GetPlayerPed(PlayerId()), (uint)GetSelectedPedWeapon(GetPlayerPed(PlayerId())));
}