SA-MP Forums Archive
[FilterScript] Damage System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Damage System (/showthread.php?tid=633651)



Damage System - Hreesang - 05.05.2017

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

I've found a bug if the dialog characters reached 1000+ it'll be cutten, if you found something else then you could reply on this thread. And also please, do not re-release and claim this as yours.

Pict:


Credits: Hreesang, LS-RP (idea)
Somebody re-edited this script, here's the link (recommended for whoever wants to put this in their roleplay gamemode):
https://forum.sa-mp.com/showpost.php...6&postcount=27


Re: Damage System - XxFiGhteRXx - 05.05.2017

Nice Work


Re: Damage System - MattL019 - 06.05.2017

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


Re: Damage System - Wolfe - 07.05.2017

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

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

https://sampwiki.blast.hk/wiki/Limits

You can only have up to 4096 characters in the information of a dialog. So that should fix your problem with that.


Re: Damage System - NealPeteros - 07.05.2017

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


Re: Damage System - Hreesang - 07.05.2017

Thank you guys for the positive comments

Quote:
Originally Posted by Wolfe
Посмотреть сообщение
The reason you're getting cut off on the text is because of big the character array is.

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

https://sampwiki.blast.hk/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;
Код:
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
Посмотреть сообщение
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
Посмотреть сообщение
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)


Re: Damage System - Legitness - 07.05.2017

I was looking for this! thanks


Re: Damage System - NealPeteros - 07.05.2017

Quote:
Originally Posted by Legitness
Посмотреть сообщение
I was looking for this! thanks
See my point?


Re: Damage System - XBrianX - 07.05.2017

Quote:
Originally Posted by NealPeteros
Посмотреть сообщение
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


Re: Damage System - NealPeteros - 08.05.2017

Quote:
Originally Posted by XBrianX
Посмотреть сообщение
Welcome to the real world kiddo
Peace out!