Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Help with Damage System

 
  • 0 Vote(s) - 0 Average
Pawn Help with Damage System
icecoldkangaroo12
Offline

Burgershot Member
Posts: 10
Threads: 2
Joined: May 2021
Reputation: 0
Location: Chile
#1
2021-05-29, 01:16 AM
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 
ImFlanny
Offline

Burgershot Member
Posts: 8
Threads: 0
Joined: May 2021
Reputation: 0
#2
2021-05-29, 02:42 AM
If you write your problem in >>other languages ​>>​Spanish,
>>programming I can help you
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#3
2021-05-29, 11:18 AM
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.
Snow
Offline

Burgershot Member
Posts: 48
Threads: 5
Joined: Oct 2020
Reputation: 2
Location: Pakistan
#4
2021-05-29, 08:40 PM (This post was last modified: 2021-05-29, 08:46 PM by Snow.)
(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]
Y_Less
Offline

Administrator

Posts: 323
Threads: 16
Joined: Feb 2019
Reputation: 90
#5
2021-05-31, 10:28 AM
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".
icecoldkangaroo12
Offline

Burgershot Member
Posts: 10
Threads: 2
Joined: May 2021
Reputation: 0
Location: Chile
#6
2021-05-31, 03:22 PM
it would be nice if I knew how to install the SKY plugin to use that include, I need help with that too...
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#7
2021-05-31, 03:58 PM (This post was last modified: 2021-05-31, 03:59 PM by Pinch.)
(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.
Snow
Offline

Burgershot Member
Posts: 48
Threads: 5
Joined: Oct 2020
Reputation: 2
Location: Pakistan
#8
2021-05-31, 11:31 PM
(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]
icecoldkangaroo12
Offline

Burgershot Member
Posts: 10
Threads: 2
Joined: May 2021
Reputation: 0
Location: Chile
#9
2021-06-03, 03:38 AM
(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
Radical
Offline

Burgershot Member
Posts: 148
Threads: 21
Joined: Dec 2020
Reputation: 16
#10
2021-06-03, 07:15 AM
(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
icecoldkangaroo12
Offline

Burgershot Member
Posts: 10
Threads: 2
Joined: May 2021
Reputation: 0
Location: Chile
#11
2021-06-03, 07:45 AM
(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
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#12
2021-06-03, 09:53 AM
[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.
icecoldkangaroo12
Offline

Burgershot Member
Posts: 10
Threads: 2
Joined: May 2021
Reputation: 0
Location: Chile
#13
2021-06-03, 06:07 PM
(2021-06-03, 09:53 AM)Pinch Wrote:
[Image: image.png]

And? where I found or I put that
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#14
2021-06-03, 06:29 PM
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.
icecoldkangaroo12
Offline

Burgershot Member
Posts: 10
Threads: 2
Joined: May 2021
Reputation: 0
Location: Chile
#15
2021-06-12, 03:10 AM
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
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode