Quantcast

Author Topic: [Tutorial]Suicide Command  (Read 4901 times)

0 Members and 1 Guest are viewing this topic.

[Tutorial]Suicide Command
« on: December 31, 2016, 02:00:38 pm »
Hello guys today i want to show you how to make a suicide script with a command... I teach y very eazy tutorials for now.
we have a lot of ways to suicide lets start..

First of all we need to set up the function and to end it
Code: [Select]
function suicide(thePlayer) --thePlayer is the one who type the command.

end

Now if we want to suicide with command, we need to attach addCommandHandler(https://wiki.multitheftauto.com/wiki/AddCommandHandler) to the function
Code: [Select]
function suicide(thePlayer) --thePlayer is the one who type the command.
       --Here we insert our code.
end
addCommandHandler("kill", suicide)

we are semi finished, we have to put our function which is killPed(https://wiki.multitheftauto.com/wiki/KillPed)
Code: [Select]
function suicide(thePlayer) --thePlayer is the one who type the command.
--Here we insert our code.
killPed(thePlayer) -- thePlayer is the one who type the command right?, if we type /kill it will kill us.
end
addCommandHandler("kill", suicide)

and We are finished it ! ..

Regards,
S3Nn4oXx.


 

SimplePortal 2.3.7 © 2008-2024, SimplePortal