[Include] [INC] Weapon Synchronizer v0.0
#1

Weapon Synchronizer include v0.0 by vovo4ka

file VWSi.inc

I write the new role play gamemode and I had a problem with my ammo system.
It's needs to save ammo correctly. Ammo anti-cheating system needs too. But GetPlayerWeaponData, GetPlayerAmmo is bugged, it sometimes returns an incorrect ammo amount.
I researched(5 days left ) this bug and have written include, helping as much as possible precisely to define correct ammo info.
It works very precisely. Maximum difference in one weapon slot - 5 bullets which I saw and it's perfectly for saving ammo info and weapon anti-cheat.

For usage it's necessary to replace standard functions on these:
  • ResetPlayerWeaponsEx(playerid)
  • GetPlayerWeaponEx(playerid)
  • GetPlayerAmmoEx(playerid)
  • GetPlayerWeaponDataEx(playerid, slot, &weapons, &ammo)
  • GivePlayerWeaponEx(playerid, weaponid, ammount)
additional function: GivePlayerWeaponInt(playerid, weaponid, ammount)
And add some function call's in OnGameModeInit, OnPlayerUpdate, OnGameModeExit, OnPlayerSpawn.
all examples in example.pwn


But, all operations with weapons and ammo should be passed through them. (actually the incorrect data will be until then while the player will not shoot. (It concerns only "old-type" pickups and аммо purchases))

I have included in an example how correctly to work with pickups.

If will find serious lags inform me please


Download this:



(bad english. sorry )
Reply


Messages In This Thread
[INC] Weapon Synchronizer v0.0 - by drV - 10.02.2009, 22:04
Re: [INC] Weapon Synchronizer v0.0 - by drV - 10.02.2009, 22:35
Re: [INC] Weapon Synchronizer v0.0 - by drV - 11.02.2009, 06:10
Re: [INC] Weapon Synchronizer v0.0 - by Redirect Left - 12.02.2009, 16:38
Re: [INC] Weapon Synchronizer v0.0 - by drV - 12.02.2009, 16:43
Re: [INC] Weapon Synchronizer v0.0 - by drV - 12.02.2009, 16:44
Re: [INC] Weapon Synchronizer v0.0 - by pspleo - 12.02.2009, 16:47
Re: [INC] Weapon Synchronizer v0.0 - by Riaz - 12.02.2009, 17:02
Re: [INC] Weapon Synchronizer v0.0 - by G_ROW_Chez - 12.02.2009, 17:12
Re: [INC] Weapon Synchronizer v0.0 - by Mikep - 12.02.2009, 17:17
Re: [INC] Weapon Synchronizer v0.0 - by G_ROW_Chez - 12.02.2009, 17:38
Re: [INC] Weapon Synchronizer v0.0 - by znake - 12.02.2009, 18:25
Re: [INC] Weapon Synchronizer v0.0 - by G_ROW_Chez - 13.02.2009, 04:01
Re: [INC] Weapon Synchronizer v0.0 - by G_ROW_Chez - 13.02.2009, 04:04
Re: [INC] Weapon Synchronizer v0.0 - by CracK - 13.02.2009, 07:58
Re: [INC] Weapon Synchronizer v0.0 - by boylett - 13.02.2009, 08:46
Re: [INC] Weapon Synchronizer v0.0 - by ryan kirky - 13.02.2009, 09:52
Re: [INC] Weapon Synchronizer v0.0 - by G_ROW_Chez - 13.02.2009, 14:08
Re: [INC] Weapon Synchronizer v0.0 - by luxeon - 23.02.2009, 09:52
Re: [INC] Weapon Synchronizer v0.0 - by drV - 23.02.2009, 10:49
Re: [INC] Weapon Synchronizer v0.0 - by Lucas Giovanni - 18.03.2009, 18:23

Forum Jump:


Users browsing this thread: 3 Guest(s)