• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Help with Damage System
#1
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?
  Reply
#2
If you write your problem in >>other languages ?>>?Spanish,

>>programming I can help you
  Reply
#3
You can use the weapon-config

https://github.com/oscar-broman/samp-weapon-config
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#4
(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.
[Image: QIDa2vB.png]

  Reply
#5
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".
  Reply
#6
it would be nice if I knew how to install the SKY plugin to use that include, I need help with that too...
  Reply
#7
(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.
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#8
(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?
[Image: QIDa2vB.png]

  Reply
#9
(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
  Reply
#10
(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
  Reply
#11
(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
  Reply
#12
[Image: image.png]
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#13
(2021-06-03, 09:53 AM)Pinch Wrote:
[Image: image.png]



And? where I found or I put that
  Reply
#14
ah...sa-mp.com download 0.3.7R2 server
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#15
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
  Reply


Forum Jump: