Quantcast

Author Topic: [Tutorial]Healing  (Read 11444 times)

0 Members and 1 Guest are viewing this topic.

[Tutorial]Healing
« on: December 30, 2016, 06:53:43 am »
Ayy ppl so I saw that the scripting section is empty and I am a Scripter SOO I said to myself why not to teach you something that will help you in the future.. LETS STOP TALKING AND START WORKING !

Code: [Select]
-- First of all we have to define our function and set it. it goes like this function function name(arguments)
function HealTut( player, commandName )
-- After we defined our function We want to do that the script will set us 100 Health inGame for the ppl who type the command
    setElementHealth(player,100)
-- We have put what should the function do if we run it (it will set the player's health to 100).
-- Now we need to put what does it say when you run the command.
    outputChatBox("You have been successfully healed!,player)
-- We almost finished the script now we need to end the function so when we run it it will end with Healing the player and running the outputchatbox
end
-- We need to add the command handler which is the command that we type like /command so this function will run.
addCommandHandler("heal",HealTut)

=====
Code: [Select]
function functionname(arguments)
--You put the code here.
setElementHealth(theElement, newHealth(in our case is 100))
-- and then you must finish your function with 'end'
end
addCommandHandler("commandName", functionname)

==================
this is Copied from Wiki
Required Arguments
theElement: The ped, vehicle or object whose health you want to set.
newHealth: A float indicating the new health to set for the element.
==================
« Last Edit: December 30, 2016, 07:02:51 am by S3Nn4oX »

Re: [Tutorial]Healing
« Reply #1 on: January 29, 2017, 06:01:31 am »
why did u post dis and u copied it from wiki? lol

Re: [Tutorial]Healing
« Reply #2 on: February 17, 2017, 02:47:27 pm »
Quote from: 'External link' pid='865' dateline='1485687691'
why did u post dis and u copied it from wiki? lol
This, lol...
Never question my loyalty, you will never know what I endure for it.

Offline Ares

  • Honourable
  • *****
Re: [Tutorial]Healing
« Reply #3 on: February 17, 2017, 02:54:12 pm »
he tried :D

Re: [Tutorial]Healing
« Reply #4 on: February 17, 2017, 04:33:44 pm »
Quote from: 'Ares link' pid='865' dateline='1487361252'
he tried :D
Well that's good ain't it? He shows interest  ;)
Never question my loyalty, you will never know what I endure for it.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal