SA-MP Forums

Go Back   SA-MP Forums > Other > Everything and Nothing

Reply
 
Thread Tools Display Modes
Old 06/10/2019, 01:55 AM   #1
Euss
Little Clucker
 
Join Date: Oct 2018
Location: The Philippines
Posts: 3
Reputation: 0
Default Is this possible to script?

Hi, I'm kinda new here and I do not have any knowledge or experience about scripting or even mapping. I just want to ask some questions about scripting (not like a tutorial) as I do not know how codes or scripts work. I am currently playing in a roleplay server and I am really intrigued with our server's healing system, or as you say script.

I wanted to suggest an idea to our suggestions forum section but one thing that's holding me is if it is possible to script. We have a normal logic that if you get any damage, you lose health points. If you eat food or receive a medical treatment, you restore health points. I want to make something about it, only if I could translate my idea into a script instantly. So here's my idea.

Healing. We eat food or get patched to restore health, instantly. The way how I admire realism is not really applied in this very basic aspect of the game. My idea about this is that it shouldn't restore your health fully in an instant. To me, it would look like you ate the whole meal with the tray included and finish it with a single gulp. It should undergo a progress (over time obviously), it should work like a regeneration rune or health potion or something like that. For example, if you buy a full meal buster that gives you 100 health points, it slowly restore health points by like a 1% every 24 seconds, thus giving you 100 health points over the span of 40 minutes. Now, my question is, is it possible to script?

Health loss. Our server is heavily composed of fights in a daily basis, may it be a gunfight or fistfight. We know how guns work in real life, yes? In fact one shot can possibly kill you but it doesn't work like that in the game because... because it would ruin the player's experience as if he assumes he's playing a superman character. In single player, it would normally take few bullets to kill a civilian, but none of that is related to my idea. My idea applies to the aftermath of a fight, specifically a shooting incident. You took a walk in the hood and got involve in a mouth fight which eventually led to you getting shot in the torso once with a pistol and let's say you lost 25 health points in that incident. You ran away from the area and hid in a safe spot. You continue your day as if nothing happens with your remaining 75 health points. There should be an effect after that, as if it would bleed more if not treated. Like you lose 1 health point every every minute, so you would pass out (in our server, it sends you to 'brutally wounded' state) if you didn't receive any medical treatment in 75 minutes, considering you lost too much blood from the gunshot wound. So my question again, is it possible to script?

I could go more in details but I only wanted to know if it would be possible to script. If you have any idea or like a draft of a script that could make this idea work, I would gladly appreciate it. Thanks for reading through.

PS: I really want to learn how to script but I don't know where to start and what to learn. I watched several YouTube videos about PAWN scripting but it's totally hard for me to catch up.
Euss is offline   Reply With Quote
Old 06/10/2019, 06:10 AM   #2
AzaMx
Huge Clucker
 
Join Date: Aug 2014
Location: Home.
Posts: 335
Reputation: 63
Default Re: Is this possible to script?

Yes, it's possible.
AzaMx is offline   Reply With Quote
Old 06/10/2019, 10:52 AM   #3
Symon
Gangsta
 
Symon's Avatar
 
Join Date: Apr 2019
Location: Italy
Posts: 515
Reputation: 18
Default Re: Is this possible to script?

Everything (or almost) is possible to script. You just need creativity and patience to test.

The best place to start from is the Wiki: https://wiki.sa-mp.com. Read it carefully and try.

Do trial and errror unless you don't understand how function X works. (Or everything else you want to learn).

Rome wasn't build in one day so, good luck.
__________________


Discord | Play Now | Website

Add your server to favourites and join our Discord.
Symon is offline   Reply With Quote
Old 06/10/2019, 11:38 AM   #4
Euss
Little Clucker
 
Join Date: Oct 2018
Location: The Philippines
Posts: 3
Reputation: 0
Default Re: Is this possible to script?

Thank you for the responses. Simply knowing that this is possible to script is enough.
Quote:
Originally Posted by Symon View Post
The best place to start from is the Wiki: https://wiki.sa-mp.com. Read it carefully and try.

Do trial and errror unless you don't understand how function X works. (Or everything else you want to learn).

Rome wasn't build in one day so, good luck.
Yeah! Thank you for that.
Euss is offline   Reply With Quote
Old 06/10/2019, 03:08 PM   #5
DRIFT_HUNTER
High-roller
 
Join Date: Oct 2009
Posts: 2,073
Reputation: 188
Default Re: Is this possible to script?

Yes its possible and actually its pretty easy to do since you already have system that allows you to eat and restore HP instantly.
__________________
Looking for someone to start drifting server, drop me a pm if you are interested.


Any PM's that include question about any kind of help will be ignored.
Use appropriate boards for that
DRIFT_HUNTER 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
how to make inventory script - MYSQL R41-2 [ mini script ] BrnX Scripting Help 2 26/08/2017 11:03 PM
Friend gave me his script and has 26 errors please help! (Script is already released public) Mappers4Life Scripting Help 5 15/05/2013 07:58 PM
Script Translation/Traduction Script/Traducción guión Jack_Rocker Help Archive 3 22/05/2011 06:34 PM
laptop script, incorporated to my script. result: can't compile to an amx file.. nikoo Help Archive 1 14/11/2009 03:57 AM
How to script a script??? how do u scripted a script, i have no clue HELP! Badandy Help Archive 10 06/06/2009 08:57 PM


All times are GMT. The time now is 01:36 PM.


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