SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Filterscripts (https://forum.sa-mp.com/forumdisplay.php?f=17)
-   -   [FilterScript] Damage System (https://forum.sa-mp.com/showthread.php?t=633651)

Hreesang 05/05/2017 07:47 AM

Damage System
 
1 Attachment(s)
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:
http://i.imgur.com/ZZ28xA8.png

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

XxFiGhteRXx 05/05/2017 08:15 AM

Re: Damage System
 
Nice Work

MattL019 06/05/2017 01:01 AM

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

Wolfe 07/05/2017 02:01 AM

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.

NealPeteros 07/05/2017 03:56 AM

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

Hreesang 07/05/2017 06:19 AM

Re: Damage System
 
Thank you guys for the positive comments

Quote:

Originally Posted by Wolfe (Post 3877083)
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 (Post 3877107)
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 (Post 3877116)
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)

Legitness 07/05/2017 02:38 PM

Re: Damage System
 
I was looking for this! thanks

NealPeteros 07/05/2017 03:25 PM

Re: Damage System
 
Quote:

Originally Posted by Legitness (Post 3877352)
I was looking for this! thanks

See my point?

XBrianX 07/05/2017 03:45 PM

Re: Damage System
 
Quote:

Originally Posted by NealPeteros (Post 3877116)
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

NealPeteros 08/05/2017 02:47 AM

Re: Damage System
 
Quote:

Originally Posted by XBrianX (Post 3877366)
Welcome to the real world kiddo

Peace out!


All times are GMT. The time now is 04:28 PM.

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