Nico.de Posted August 2, 2011 Share Posted August 2, 2011 I want a script , when a player writes /kill he get suicide commited.. And so he can change the team (Stealth) THX Link to comment
Castillo Posted August 2, 2011 Share Posted August 2, 2011 -- server side script: addCommandHandler("kill", function (thePlayer) killPed(thePlayer) end) Link to comment
Nico.de Posted August 2, 2011 Author Share Posted August 2, 2011 Thanks a lot SolidSnake.. Link to comment
bandi94 Posted August 3, 2011 Share Posted August 3, 2011 function commitSuicide (player) killPed ( player, player) end addCommandHandler ( "kill", commitSuicide) Link to comment
Castillo Posted August 3, 2011 Share Posted August 3, 2011 The script should work if you setup up it's meta.xml correctly. P.S: Bandi, the second argument is theKiller, that's not required, please take some time reading the required arguments. Required Arguments: thePed: The ped to kill Link to comment
bandi94 Posted August 3, 2011 Share Posted August 3, 2011 yes i know what is it the secound argument (else i don't put it ....) Link to comment
Castillo Posted August 3, 2011 Share Posted August 3, 2011 So, could you explain why you put it if there's no point? Link to comment
#Paper Posted August 3, 2011 Share Posted August 3, 2011 isn't the /kill command integrated in MTA? Link to comment
bandi94 Posted August 3, 2011 Share Posted August 3, 2011 use /debugscript 3 to find the error Link to comment
TAPL Posted August 4, 2011 Share Posted August 4, 2011 function KillCmd ( thePlayer, cmd ) if ( thePlayer ) then killPed ( thePlayer ) end end addCommandHandler ( "kill", KillCmd ) Link to comment
#Paper Posted August 4, 2011 Share Posted August 4, 2011 No. Omg, ye i got confused whit race mode Sry LoL Link to comment
Nico.de Posted August 4, 2011 Author Share Posted August 4, 2011 THX TAPL I KNOW U FROM KSA BASEMODE SERVER ! Link to comment
Nico.de Posted August 4, 2011 Author Share Posted August 4, 2011 Don't work anyway.. That's the meta Link to comment
bandi94 Posted August 4, 2011 Share Posted August 4, 2011 i say again use " /debugscript 3 " to find and post the error Link to comment
JR10 Posted August 4, 2011 Share Posted August 4, 2011 It's obvious, it's script not file. meta.xml: <meta> <info author="[GCC]^_Nico.de" type="script" /> <script src="kill.lua" type="server" /> </meta> Link to comment
Castillo Posted August 4, 2011 Share Posted August 4, 2011 See? that's what I told him, the bug was in the meta.xml, I have enough scripting experience to know that it was working. Link to comment
Nico.de Posted August 4, 2011 Author Share Posted August 4, 2011 Ah thx a lot.. I knew something is wrong Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now