SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 10/02/2009, 10:04 PM   #1
drV
Little Clucker
 
Join Date: Nov 2008
Posts: 16
Reputation: 4
Default [INC] Weapon Synchronizer v0.0

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 )
drV is offline   Reply With Quote
Old 10/02/2009, 10:35 PM   #2
drV
Little Clucker
 
Join Date: Nov 2008
Posts: 16
Reputation: 4
Default Re: [INC] Weapon Synchronizer v0.0

It's impossible to make in another way
drV is offline   Reply With Quote
Old 11/02/2009, 06:10 AM   #3
drV
Little Clucker
 
Join Date: Nov 2008
Posts: 16
Reputation: 4
Default Re: [INC] Weapon Synchronizer v0.0

I have found solution allowing to obtain true data about ammo. And also realised it in include functions.
Try demo example to see results.
drV is offline   Reply With Quote
Old 12/02/2009, 04:38 PM   #4
Redirect Left
High-roller
 
Redirect Left's Avatar
 
Join Date: Mar 2007
Location: Yorkshire, England
Posts: 1,026
Reputation: 362
Default Re: [INC] Weapon Synchronizer v0.0

v0.0?

Apparantly, this doesn't even exist.
Redirect Left is offline   Reply With Quote
Old 12/02/2009, 04:43 PM   #5
drV
Little Clucker
 
Join Date: Nov 2008
Posts: 16
Reputation: 4
Default Re: [INC] Weapon Synchronizer v0.0

Quote:
Originally Posted by G_ROW_Chez
ыыыыы бля вовчиГ... ты популярен... Сеиф тя похвалил xD


I have found new inaccuracy with the weapon in transport. I do the new include version.
drV is offline   Reply With Quote
Old 12/02/2009, 04:44 PM   #6
drV
Little Clucker
 
Join Date: Nov 2008
Posts: 16
Reputation: 4
Default Re: [INC] Weapon Synchronizer v0.0

Quote:
Originally Posted by [RP
Jolteon ]
v0.0?
Yes But not the last
drV is offline   Reply With Quote
Old 12/02/2009, 04:47 PM   #7
pspleo
Gangsta
 
Join Date: Nov 2007
Posts: 747
Reputation: 4
Default Re: [INC] Weapon Synchronizer v0.0

Nice!
pspleo is offline   Reply With Quote
Old 12/02/2009, 05:02 PM   #8
Riaz
Big Clucker
 
Riaz's Avatar
 
Join Date: Oct 2007
Posts: 180
Reputation: 1
Default Re: [INC] Weapon Synchronizer v0.0

G_ROW_Chez, тут говорят по английски [Here talking as English Language]
__________________
Tomsknet A/D :: 217.18.138.23:7776
Riaz is offline   Reply With Quote
Old 12/02/2009, 05:12 PM   #9
G_ROW_Chez
Big Clucker
 
Join Date: Jan 2009
Posts: 94
Reputation: 0
Default Re: [INC] Weapon Synchronizer v0.0

I Know xD
G_ROW_Chez is offline   Reply With Quote
Old 12/02/2009, 05:17 PM   #10
Mikep
High-roller
 
Join Date: Apr 2008
Posts: 1,042
Reputation: 2
Default Re: [INC] Weapon Synchronizer v0.0

Quote:
Originally Posted by vovo4ka
Quote:
Originally Posted by [RP
Jolteon ]
v0.0?
Yes But not the last
It can't be version 0 -.-
Mikep is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with getting a weapon from Weapon Data KuHS Help Archive 0 10/03/2010 06:12 PM
Weapon ID Bug V1ceC1ty Help Archive 0 13/09/2009 02:45 PM
Anti Weapon + Weapon Pickups? BP13 Help Archive 3 30/08/2009 10:33 PM
weapon Ribber Help Archive 17 03/07/2009 07:11 AM


All times are GMT. The time now is 12:25 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.