[Include] weapon-config.inc - Damage system with many features

This system allows cheaters to shoot through objects (because we trust only shooter and don't listening what damaged player saying about trajectory of bullet). So there is no way to make really good server-sided shooting system without plugins like ColAndreas (but they are very slow for that kind of usage).

Sorry for my bad English.
Reply

Quote:
Originally Posted by stabker
View Post
This system allows cheaters to shoot through objects (because we trust only shooter and don't listening what damaged player saying about trajectory of bullet). So there is no way to make really good server-sided shooting system without plugins like ColAndreas (but they are very slow for that kind of usage).

Sorry for my bad English.
Maybe a check every second if the issuer isn't shooting through walls, and if he is return 0; any damage until the next check gives a green light.
Reply

Quote:
Originally Posted by Jeroen52
View Post
Maybe a check every second if the issuer isn't shooting through walls, and if he is return 0; any damage until the next check gives a green light.
Yeah, i thought about that too, in this case maybe it would be not really hard for server. Need to try that.
Reply

Quote:
Originally Posted by stabker
View Post
Yeah, i thought about that too, in this case maybe it would be not really hard for server. Need to try that.
It also depends on the amount of players, but I think that it is with everything.
Could also get the script to loop around all players at its own pace and return 0; if a player is getting shot through an object.
Reply

Quote:
Originally Posted by Jeroen52
View Post
I might give it a go.
Putting it off for a while, not really familiar with the source yet.
Reply

Quote:
Originally Posted by stabker
View Post
This system allows cheaters to shoot through objects (because we trust only shooter and don't listening what damaged player saying about trajectory of bullet). So there is no way to make really good server-sided shooting system without plugins like ColAndreas (but they are very slow for that kind of usage).

Sorry for my bad English.
False. This has absolutely nothing to do with objects. The bullets are still synced as usual, nothing is in this to bother that except invalid shots.
Reply

Quote:
Originally Posted by Crayder
View Post
False. This has absolutely nothing to do with objects. The bullets are still synced as usual, nothing is in this to bother that except invalid shots.
Not false. By default shooter sends bullet, then client of target-player draw this bullet, and if obstacles doesn't exist on the bullet trajectory, target-player takes damage. But when you use this include, shooter just sends bullet and target-player takes damages without "listening his opinion about this shot". So cheater can give damage through walls (for example, by removing bullet collision with any object, except players). Thats why godmode doesn't work with this include.

You can simply check it by removing any obstacle (only for your client) and shoot player that standing behind it.

Sorry for horrible speech. Hope you understand me.
Reply

Quote:
Originally Posted by stabker
View Post
This system allows cheaters to shoot through objects (because we trust only shooter and don't listening what damaged player saying about trajectory of bullet). So there is no way to make really good server-sided shooting system without plugins like ColAndreas (but they are very slow for that kind of usage).

Sorry for my bad English.
The alternative is worse, at least for serious DM servers - not being able to hit someone when they run around a corner and even when they are in clear line of sight (for various reasons).

I've been tinkering a bit with ColAndreas lately and I might publish something for weapon-config soon, if it turns out well.

Either way, this does not prevent aimbots and other cheats of that kind (at least not all of them). There is no way to patch everything in SA-MP, that's why servers have many admins and moderators.
Reply

I'm planning to add a new custom damage type to our gamemode that is damage over time via STIs/STDs.
I'd like to deal out the damage using DamagePlayer.

I have given a throw at adding it but I'm unsure if I did it correctly.

Is this the correct way?: https://puu.sh/kpsDW/715c7ba292.txt
Reply

Quote:
Originally Posted by Jeroen52
Посмотреть сообщение
I'm planning to add a new custom damage type to our gamemode that is damage over time via STIs/STDs.
I'd like to deal out the damage using DamagePlayer.

I have given a throw at adding it but I'm unsure if I did it correctly.

Is this the correct way?: https://puu.sh/kpsDW/715c7ba292.txt
That could work. How are you dealing with it in your script though?
Reply

Well first off you could just use SetWeaponName to set the name of id 21. That way you wouldn't need to modify weapon-config. If you do wish to modify the include, you should make a generic solution.
For example, you could make weaponid 21 a custom damage type, then use bodypart to specify which one.
That way, all the custom weapon data could be in another array. That's good because it will not go through the range/rate/dmg checks anyway.
Reply

Quote:
Originally Posted by Crayder
Посмотреть сообщение
That could work. How are you dealing with it in your script though?
Currently we are just using SetPlayerHealth to decrease someone's health by 5 hitpoints every time.

Quote:
Originally Posted by Slice
Посмотреть сообщение
Well first off you could just use SetWeaponName to set the name of id 21. That way you wouldn't need to modify weapon-config. If you do wish to modify the include, you should make a generic solution.
For example, you could make weaponid 21 a custom damage type, then use bodypart to specify which one.
That way, all the custom weapon data could be in another array. That's good because it will not go through the range/rate/dmg checks anyway.
Oh thanks, I didn't know that I could easily use SetWeaponName since it wasn't in the documentation, but a quick ****** search did return https://github.com/oscar-broman/samp...nfig/issues/28
Can I use SetWeaponName on weapon ID 21 (since it hasn't been used) or should I go with some higher value?
Reply

Hello, I think I found a bug/or its a problem on my side

But whenever I add an NPC into my server certain things stop working, like the damage informer
the little "rejected hit" notification doesnt pop up in the chat. If i remove the "connectNPC" line it works again.

Is my server dying from AIDS?
Reply

Quote:
Originally Posted by Counterafk
Посмотреть сообщение
Hello, I think I found a bug/or its a problem on my side

But whenever I add an NPC into my server certain things stop working, like the damage informer
the little "rejected hit" notification doesnt pop up in the chat. If i remove the "connectNPC" line it works again.

Is my server dying from AIDS?
Maybe add a check to look if the player isn't a bot.
And for me this include is working, and I have a bot, maybe it is your code.
Reply

I got a friend to hop on, and apparently its something to do with me(I think) because he can see the damage informer
but I cant.

Friends point of view: http://i.imgur.com/hgZk58C.jpg


While for me I hear the ding but no damage informer.
Mine: http://i.imgur.com/HHRGXve.jpg

Any ideas?
Reply

Get the crashdetect plugin and look out for warnings in the console.

Also, are you creating TextDraws in your script?

It could also be a problem with id 0, that your code messes something up. If your script is not too big or a national secret, publish it on Pastebin and PM it to me then I'll have a look.
Reply

PM:d my national secret code.
Reply

Well.. could you show me the full log?
Reply

Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[16:36:24] 
[16:36:24] Server Plugins
[16:36:24] --------------
[16:36:24]  Loading plugin: crashdetect
[16:36:24]   CrashDetect v4.15.1 is OK.
[16:36:24]   Loaded.
[16:36:24]  Loading plugin: wp
[16:36:24]  
[16:36:24]  ==================
[16:36:24]  
[16:36:24]   Whirlpool loaded
[16:36:24]  
[16:36:24]  ==================
[16:36:24]  
[16:36:24]   Loaded.
[16:36:24]  Loading plugin: sscanf
[16:36:24] 

[16:36:24]  ===============================

[16:36:24]       sscanf plugin loaded.     

[16:36:24]          Version:  2.8.1        

[16:36:24]    © 2012 Alex "******" Cole  

[16:36:24]  ===============================

[16:36:24]   Loaded.
[16:36:24]  Loading plugin: streamer
[16:36:24] 

*** Streamer Plugin v2.7.8 by Incognito loaded ***

[16:36:24]   Loaded.
[16:36:24]  Loading plugin: mysql
[16:36:24]  >> plugin.mysql: R39-2 successfully loaded.
[16:36:24]   Loaded.
[16:36:24]  Loading plugin: GeoIP_Plugin
[16:36:24] GeoIP_Plugin got loaded.
[16:36:24]   Loaded.
[16:36:24]  Loading plugin: iTD
[16:36:24] 
* iTD Plugin loaded. (Support for textdraw editor mouse/keyboard)

[16:36:24]   Loaded.
[16:36:24]  Loading plugin: libRegEx
[16:36:24] 
[16:36:24]  ------------------------------
[16:36:24]  |
[16:36:24]  | -> Regular Expression Plugin v0.2
[16:36:24]  | -> Using Oniguruma v5.9.5
[16:36:24]  |
[16:36:24]  ------ © 2014, Koala -------
[16:36:24] 
[16:36:24]   Loaded.
[16:36:24]  Loading plugin: nativechecker
[16:36:24]   Loaded.
[16:36:24]  Loading plugin: SKY
[16:36:24]   Loaded.
[16:36:24]  Loaded 10 plugins.

[16:36:24] 
[16:36:24] Ban list
[16:36:24] --------
[16:36:24]  Loaded: samp.ban
[16:36:24] 
[16:36:24] 
[16:36:24] Filterscripts
[16:36:24] ---------------
[16:36:24]   Loading filterscript 'iTD.amx'...
[16:36:24] 
	iPLEOMAX's TextDraw Editor loaded successfully!
	Version: 1.16 Stable (13/10/2012)

[16:36:24]   Loading filterscript 'progesss.amx'...
[16:36:24] Progress Bar Creator by Flavio Toribio loaded
[16:36:24]   Loading filterscript 'cameditor.amx'...
[16:36:24] 
--------------------------------------
[16:36:24]  CamEditor by Drebin
[16:36:24] --------------------------------------

[16:36:24]   Loading filterscript 'anim_preloader.amx'...
[16:36:24]    ___          _          ___             __               __
[16:36:24]   / _ |  ___   (_)__ _    / _\ ____ ___  / /___  ___ _ ___/ /___  ____
[16:36:24]  / __ | / _ \ / //  ' \  / ___// __// -_)/ // _ \/ _ `// _  // -_)/ __/
[16:36:24] /_/ |_|/_//_//_//_/_/_/ /_/   /_/   \__//_/ \___/\_,_/ \_,_/ \__//_/
[16:36:24]                                              loaded.

[16:36:24]   Loading filterscript 'revctrl.amx'...
[16:36:24]   Loaded 5 filterscripts.

[16:36:25]    Error: Function not registered: 'FreezeSyncData'
[16:36:25]    Error: Function not registered: 'SetFakeFacingAngle'
[16:36:25]    Error: Function not registered: 'SendLastSyncData'
[16:36:25]    Error: Function not registered: 'ClearAnimationsForPlayer'
[16:36:25]    Error: Function not registered: 'SetKnifeSync'
[16:36:25]    Error: Function not registered: 'SetFakeHealth'
[16:36:25]    Error: Function not registered: 'SetFakeArmour'
[16:36:25]    Error: Function not registered: 'PlayerTextDrawSetPosition'
[16:36:25]    Error: Function not registered: 'SpawnPlayerForWorld'
[16:36:25]  
[16:36:25]  
[16:36:25]  
[16:36:25]  ======================================= 
[16:36:25]  |                                     | 
[16:36:25]  |        YSI version 4.00.0001        | 
[16:36:25]  |        By Alex "******" Cole        | 
[16:36:25]  |                                     | 
[16:36:25]  ======================================= 
[16:36:25]  
[16:36:25] [MYSQL]: Connection to database (bazadate) was established!
[16:36:25] 1 businesses loaded
[16:36:25] 1 houses loaded
[16:36:25] [script] 18 turfs loaded.
[16:36:25] Achievement ID: 1 | Name: Get the Driving License
[16:36:25] Achievement ID: 2 | Name: Get the Sailing License
[16:36:25] Achievement ID: 3 | Name: Get the Flying License
[16:36:25] Achievement ID: 4 | Name: Get the Gun License
[16:36:25] Achievement ID: 5 | Name: Join a Faction
[16:36:25] Achievement ID: 6 | Name: Get rank 6
[16:36:25] Achievement ID: 7 | Name: Become a Leader
[16:36:25] Achievement ID: 8 | Name: Become an Admin
[16:36:25] [script] 5 admin teleports loaded.
[16:36:25] Anti advertising system loaded. Filters found: 1
[16:36:25] *Spawn-bikes loaded: 5*
[16:36:25] [CLANS] 4 clans loaded
[16:36:25] [FREQS] 4 private frequencies loaded
[16:36:25] -mSelection- WARNING: Failed to load list: "skinbik.txt"
[16:36:25] -mSelection- WARNING: Failed to load list: "skincsa.txt"
[16:36:25]  
[16:36:25]  
[16:36:25]  RPG: RC6 San Fierro
[16:36:25] _____________________
[16:36:25] Number of vehicle models: 3
Reply

Try removing some plugins (nativechecker, itd, geoip) to see if they are interfering with SKY.

Did you compile SKY yourself or download it?
Reply


Forum Jump:


Users browsing this thread: 13 Guest(s)