Liberty Unleashed
Scripting => Script Help => Topic started by: Ankit on February 20, 2012, 01:48:29 pm
-
You Know My Fix Command I Want To Make A Bindkey for it example when player drives a vehicle and he wants to repair his vehicle by pressing 2 so how do i make it?
-
http://liberty-unleashed.co.uk/LUWiki/Squirrel/Client/Functions/Controls/BindKey (http://liberty-unleashed.co.uk/LUWiki/Squirrel/Client/Functions/Controls/BindKey)
function onScriptLoad()
{
BindKey( '2', BINDTYPE_DOWN, FixCar, 123 );
return 1;
}
function FixCar( id )
{
Message( "You fixed car with ID " + somenumber );
}
-
you could just say "i want to copy svenko's server :P"
dude i tried adding it from your useful scripts but i am not doing it correctly so i want to do it seperatly
:P
-
i dont have any binds or binds_client.nut so do i have to create them ,copy then paste and save them
when i run server go in i spawn /infernus when my car is damaged i press U nothing happens
-
i tried everything you told me i added it but after when i go in my server and press u in car to fix the damage nothing happens why?
-
I guess you haven't read Svenko's reply good enough.
1. Did you add both binds.net and binds_client.nut in the same folder as the rest of your scripts.
2. Did you add the <script file="binds.nut" client="0"> lines to you script.xml?
3. Does the rest of the script actually load? You can try putting a print into the onScriptLoad function.
Good luck.
-
Does the rest of the script actually load? You can try putting a print into the onScriptLoad function.
i tried adding print to it , it doesnt loads so what did i do wrong?
-
Then you forgot to add them to your script.xml, or added them wrongly.
-
i didnt forgot even a word
-
you need to put it in folder named binds and add
<script folder="binds"/>
to your content.xml