very very simple server sided weapons in progress
#1

So we set a variable PlayerInfo[i][pHasGun] and whenever the player buys a gun this variable turns into 1.

GetPlayerWeaponData(i, w, weapon, ammo);

if(weapon >= 1 && weapon <= 46 && PlayerInfo[i][pHasGun] == 0)//gun check if the player has a gun which id is higher than 0 and lower or equal to 46 which was not bought ingame then it would reset player weapons, else it won't
{
ResetPlayerWeapons(i);
{
format(string, sizeof(string), "AdmCmd: %s Tried to hack and his/her guns have got resetted", PlayerName(i));
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
}
I tested this and it worked, but hackers may still find their way through.
Known Issues: The player may buy a mp5 and then he will start hacking weapons all around

We can also set a method so the player gets a gun with a quantity of ammo of 8000 for example and if the ammo is lower than 5000 we can strip the weapons away.
Reply


Messages In This Thread
very very simple server sided weapons in progress - by belhot - 03.06.2010, 21:29
Re: very very simple server sided weapons in progress - by ViruZZzZ_ChiLLL - 03.06.2010, 21:47
Re: very very simple server sided weapons in progress - by Jonni8 - 03.06.2010, 21:47
Re: very very simple server sided weapons in progress - by Conroy - 03.06.2010, 21:52
Re: very very simple server sided weapons in progress - by coole210 - 03.06.2010, 22:01

Forum Jump:


Users browsing this thread: 1 Guest(s)