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
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
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)
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.