open.mp forum
[Pawn] Help with Damage System - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] Help with Damage System (/showthread.php?tid=2059)



Help with Damage System - icecoldkangaroo12 - 2021-05-29

Dear Community



I wanna ask to you how can I make any damage system without using includes?



I mean if there is a possibility to make a different damage system, that a weapon will lower more life or that less life without using external plugins or includes?



Example - I need the sawn-off weapon to make -60 of damage?from the player who receives the shots, is that possible to do without using the above?



If you guys can guide/help me and show me some examples with code please



NOTE: I'm using the callback called OnPlayerTakeDamage(parameters) but i dont have anything of this?


RE: Help with Damage System - ImFlanny - 2021-05-29

If you write your problem in >>other languages ?>>?Spanish,

>>programming I can help you


RE: Help with Damage System - Pinch - 2021-05-29

You can use the weapon-config

https://github.com/oscar-broman/samp-weapon-config


RE: Help with Damage System - Snow - 2021-05-29

(2021-05-29, 11:18 AM)Pinch Wrote: You can use the weapon-config
https://github.com/oscar-broman/samp-weapon-config

The op clearly mentioned he does not want to use any includes/fs.
You can modify the damage under OnPlayerTakeDamage & OnPlayerGiveDamage. Like this
Code:
if(weaponid == 26)
{
    SetPlayerHealth(playerid/issuerid, -60.0);    
}
This will remove 60% of the player's health. Use issuer/player id accordingly to the callback.
But I'd still recommend you to use the weapon-config as that's pretty much better than configuring each and everything on your own.


RE: Help with Damage System - Y_Less - 2021-05-31

Why? Includes are there for a reason - to save you time and provide stable tested code for free. You might want to look up "Not Invented Here".


RE: Help with Damage System - icecoldkangaroo12 - 2021-05-31

it would be nice if I knew how to install the SKY plugin to use that include, I need help with that too...


RE: Help with Damage System - Pinch - 2021-05-31

(2021-05-29, 08:40 PM)Snow Wrote:
(2021-05-29, 11:18 AM)Pinch Wrote: You can use the weapon-config
https://github.com/oscar-broman/samp-weapon-config

The op clearly mentioned he does not want to use any includes/fs.
You can modify the damage under OnPlayerTakeDamage & OnPlayerGiveDamage. Like this
Code:
if(weaponid == 26)
{
    SetPlayerHealth(playerid/issuerid, -60.0);    
}
This will remove 60% of the player's health. Use issuer/player id accordingly to the callback.
But I'd still recommend you to use the weapon-config as that's pretty much better than configuring each and everything on your own.
The op clearly opened 3 threads on 3 different languages (he didn't mention that he didn't want to use WC, quite the opposite in other ones) and sent me PMs of asking how to install SKY too.


RE: Help with Damage System - Snow - 2021-05-31

(2021-05-31, 03:22 PM)icecoldkangaroo12 Wrote: it would be nice if I knew how to install the SKY plugin to use that include, I need help with that too...



Download it from here and put it in the plugins folder? Is that hard?


RE: Help with Damage System - icecoldkangaroo12 - 2021-06-03

(2021-05-29, 02:42 AM)ImFlanny Wrote: If you write your problem in >>other languages >>Spanish,

>>programming I can help you



(2021-05-31, 11:31 PM)Snow Wrote:
(2021-05-31, 03:22 PM)icecoldkangaroo12 Wrote: it would be nice if I knew how to install the SKY plugin to use that include, I need help with that too...



Download it from here and put it in the plugins folder? Is that hard?



Tell me, it's an include or plugin? because i see .inc not .dll or .so


RE: Help with Damage System - Radical - 2021-06-03

(2021-06-03, 03:38 AM)icecoldkangaroo12 Wrote: Tell me, it's an include or plugin? because i see .inc not .dll or .so



Download sky.inc from?https://github.com/oscar-broman/SKY



Download sky.dll from?https://github.com/oscar-broman/SKY/releases

(If your?os Linux or Ubuntu, download .so)



Put sky.inc to following folder:

../pawno/includes



Put sky.dll or sky.so?to following folder:

../plugins


RE: Help with Damage System - icecoldkangaroo12 - 2021-06-03

(2021-06-03, 07:15 AM)Radical Wrote:
(2021-06-03, 03:38 AM)icecoldkangaroo12 Wrote: Tell me, it's an include or plugin? because i see .inc not .dll or .so



Download sky.inc from?https://github.com/oscar-broman/SKY



Download sky.dll from?https://github.com/oscar-broman/SKY/releases

(If your?os Linux or Ubuntu, download .so)



Put sky.inc to following folder:

../pawno/includes



Put sky.dll or sky.so?to following folder:

../plugins



I got some errors:



Code:
include\weapon-config.inc(1817) : warning 202: number of arguments does not match definition

include\weapon-config.inc(1815) : warning 203: symbol is never used: "addsiren"

include\weapon-config.inc(2327) : error 017: undefined symbol "GetPlayerPoolSize"

include\weapon-config.inc(2737) : error 017: undefined symbol "GetPlayerPoolSize"

include\weapon-config.inc(2903) : error 017: undefined symbol "GetPlayerPoolSize"

include\weapon-config.inc(3690) : error 017: undefined symbol "GetPlayerPoolSize"

include\weapon-config.inc(3734) : error 017: undefined symbol "GetPlayerPoolSize"

include\weapon-config.inc(3908) : error 017: undefined symbol "GetPlayerPoolSize"

include\weapon-config.inc(3974) : error 017: undefined symbol "GetPlayerPoolSize"

include\weapon-config.inc(4245) : error 017: undefined symbol "GetPlayerPoolSize"

include\weapon-config.inc(4364) : error 017: undefined symbol "GetPlayerPoolSize"

include\weapon-config.inc(5286) : error 017: undefined symbol "GetPlayerPoolSize"

include\weapon-config.inc(5301) : error 017: undefined symbol "GetPlayerPoolSize"

weapon-config.inc(5552) : error 017: undefined symbol "GetPlayerPoolSize"

include\weapon-config.inc(5566) : error 017: undefined symbol "GetPlayerPoolSize"

gamemodes\t1q_cwtg.pwn(1591) : error 017: undefined symbol "weaponid"

Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



RE: Help with Damage System - Pinch - 2021-06-03

[Image: image.png]



RE: Help with Damage System - icecoldkangaroo12 - 2021-06-03

(2021-06-03, 09:53 AM)Pinch Wrote:
[Image: image.png]



And? where I found or I put that


RE: Help with Damage System - Pinch - 2021-06-03

ah...sa-mp.com download 0.3.7R2 server


RE: Help with Damage System - icecoldkangaroo12 - 2021-06-12

Thanks a lot! finally I've installed this include succesfully, but anyone can gimme one example how to make a simple new damage system with it, I've followed the documentation of this repository (weapon-config) all is a-ok but when I start my server I have like infinite health and I cannot infring nothing of damage, anyone know how to make a good damage system example with this include, if it yes, reply here please and sorry xD