[FilterScript] Damage System
#1

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
Reply
#2

Nice Work
Reply
#3

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
Reply
#4

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.
Reply
#5

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
Reply
#6

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)
Reply
#7

I was looking for this! thanks
Reply
#8

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

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
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)