Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /var/www/sa-mp.com/forum/showthread.php on line 25
[FilterScript] Damage System - SA-MP Forums
SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 05/05/2017, 07:47 AM   #1
Hreesang
Little Clucker
 
Join Date: Apr 2016
Location: Indonesia
Posts: 19
Reputation: 15
Default Damage System

This is my first filterscript I made, I got the idea from LS-RP damage system and then I trying to code that system, hope you enjoy this one.

I just found a bug if the dialog characters reached 1000+ it'll be cut, if you found some you can reply on this thread. And also please, do not re-release and claim this as yours.

Pict:


Credits: LS-RP for the idea and Hreesang

Sorry for the bad english
Attached Files
File Type: rar Damage System.rar (27.9 KB, 477 views)
Hreesang is offline   Reply With Quote
Old 05/05/2017, 08:15 AM   #2
XxFiGhteRXx
Little Clucker
 
Join Date: Dec 2016
Location: Grave
Posts: 15
Reputation: 0
Default Re: Damage System

Nice Work
__________________
XxFiGhteRXx is offline   Reply With Quote
Old 06/05/2017, 01:01 AM   #3
MattL019
Little Clucker
 
MattL019's Avatar
 
Join Date: Apr 2017
Location: Scotland
Posts: 9
Reputation: 0
Default Re: Damage System

This is a very well scripted damage system and works perfectly. Useful to reference from the code as learning points. Thank you for sharing this!

+rep
__________________
I occasionally stream RP servers (ls-rp/rc-rp) and a few others games (pubg):
https://www.twitch.tv/mattl019
MattL019 is offline   Reply With Quote
Old 07/05/2017, 02:01 AM   #4
Wolfe
Big Clucker
 
Join Date: Feb 2015
Posts: 162
Reputation: 55
Default Re: Damage System

The reason you're getting cut off on the text is because of big the character array is.

Code:
str[1000], str1[500], count = 0, name[MAX_PLAYER_NAME];
str[1000] should be str[4096] or whatever because in the samp limits;

http://wiki.sa-mp.com/wiki/Limits

You can only have up to 4096 characters in the information of a dialog. So that should fix your problem with that.
Wolfe is offline   Reply With Quote
Old 07/05/2017, 03:56 AM   #5
NealPeteros
Gangsta
 
NealPeteros's Avatar
 
Join Date: Dec 2015
Location: GetPlayerCountry(playerid);
Posts: 633
Reputation: 51
Default Re: Damage System

I had a script like this for 3 months, never wanted anyone who had the same as mine to release it. I liked it to become a mystery.

I apologize for being such a greedy man (xD)

EDIT: I could suggest you to be more unique rather than just copying the whole idea from LS:RP, although it's a cool one, players won't find it original
__________________
Quote:
SA-MP is like a drug or alcohol or smoking.. you really get used to it and can not leave it.
NealPeteros is offline   Reply With Quote
Old 07/05/2017, 06:19 AM   #6
Hreesang
Little Clucker
 
Join Date: Apr 2016
Location: Indonesia
Posts: 19
Reputation: 15
Default Re: Damage System

Thank you guys for the positive comments

Quote:
Originally Posted by Wolfe View Post
The reason you're getting cut off on the text is because of big the character array is.

Code:
str[1000], str1[500], count = 0, name[MAX_PLAYER_NAME];
str[1000] should be str[4096] or whatever because in the samp limits;

http://wiki.sa-mp.com/wiki/Limits

You can only have up to 4096 characters in the information of a dialog. So that should fix your problem with that.
I been tried it before, but it's showing;
Code:
Header size:           1084 bytes
Code size:            31096 bytes
Data size:         24016472 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4840 cells (19360 bytes)
Total requirements:24065036 bytes
And when I type the cmd In-Game, it's shown SERVER: Unknown Command, so I replaced it to 1000.

Quote:
Originally Posted by Arthur Kane View Post
Your script doesn't work.

It returns at least 30 "variable shadows a variable at a preceding level". There are also warnings showing from inside /y_ini includes.

Specifically the ShowDamages.
You've included the same variable at your gamemode, try to change it in your gamemode or in the filterscript.

Quote:
Originally Posted by NealPeteros View Post
I had a script like this for 3 months, never wanted anyone who had the same as mine to release it. I liked it to become a mystery.

I apologize for being such a greedy man (xD)

EDIT: I could suggest you to be more unique rather than just copying the whole idea from LS:RP, although it's a cool one, players won't find it original
I found myself bored then decided to code this filterscript (xD)
Hreesang is offline   Reply With Quote
Old 07/05/2017, 02:38 PM   #7
Legitness
Banned
 
Join Date: May 2017
Location: Belgium
Posts: 10
Reputation: 0
Default Re: Damage System

I was looking for this! thanks
Legitness is offline   Reply With Quote
Old 07/05/2017, 03:25 PM   #8
NealPeteros
Gangsta
 
NealPeteros's Avatar
 
Join Date: Dec 2015
Location: GetPlayerCountry(playerid);
Posts: 633
Reputation: 51
Default Re: Damage System

Quote:
Originally Posted by Legitness View Post
I was looking for this! thanks
See my point?
__________________
Quote:
SA-MP is like a drug or alcohol or smoking.. you really get used to it and can not leave it.
NealPeteros is offline   Reply With Quote
Old 07/05/2017, 03:45 PM   #9
XBrianX
Huge Clucker
 
Join Date: May 2015
Location: Dubai
Posts: 469
Reputation: 75
Default Re: Damage System

Quote:
Originally Posted by NealPeteros View Post
I had a script like this for 3 months, never wanted anyone who had the same as mine to release it. I liked it to become a mystery.

I apologize for being such a greedy man (xD)

EDIT: I could suggest you to be more unique rather than just copying the whole idea from LS:RP, although it's a cool one, players won't find it original
Welcome to the real world kiddo
__________________

XBrianX is offline   Reply With Quote
Old 08/05/2017, 02:47 AM   #10
NealPeteros
Gangsta
 
NealPeteros's Avatar
 
Join Date: Dec 2015
Location: GetPlayerCountry(playerid);
Posts: 633
Reputation: 51
Default Re: Damage System

Quote:
Originally Posted by XBrianX View Post
Welcome to the real world kiddo
Peace out!
__________________
Quote:
SA-MP is like a drug or alcohol or smoking.. you really get used to it and can not leave it.
NealPeteros 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
Damage system MerryDeer Scripting Help 1 16/09/2016 06:38 AM
Damage/Hit System - Sistema de Damage/Hit Franco33 Scripting Help 0 20/08/2016 04:53 AM
Damage system Alex_T Scripting Help 3 05/01/2015 02:32 PM
Damage System Help Gaurav_Rawat Scripting Help 1 02/08/2013 05:24 PM
[Include] Car damage system - Damage a car without a driver! The_Moddler Includes 68 30/03/2012 01:38 AM


All times are GMT. The time now is 03:18 AM.


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