Author Topic: Bindkey Help  (Read 4132 times)

Ankit

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-3
    • View Profile
Bindkey Help
« 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?

Romop5

  • Jr. Member
  • **
  • Posts: 83
  • Karma: +2/-1
  • A student of university and creator of LHMP.
    • View Profile
    • LHMP
Re: Bindkey Help
« Reply #1 on: February 20, 2012, 05:47:04 pm »
http://liberty-unleashed.co.uk/LUWiki/Squirrel/Client/Functions/Controls/BindKey
Code: [Select]
function onScriptLoad()
{
     BindKey( '2', BINDTYPE_DOWN, FixCar, 123 );
     
     return 1;
}
 
function FixCar( id )
{
     Message( "You fixed car with ID " + somenumber );
}

Ankit

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-3
    • View Profile
Re: Bindkey Help
« Reply #2 on: February 21, 2012, 03:32:18 am »
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
« Last Edit: February 21, 2012, 03:34:13 am by Ankit »

Ankit

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-3
    • View Profile
Re: Bindkey Help
« Reply #3 on: February 21, 2012, 03:40:33 am »
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

Ankit

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-3
    • View Profile
Re: Bindkey Help
« Reply #4 on: February 21, 2012, 11:00:43 am »
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?

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: Bindkey Help
« Reply #5 on: February 21, 2012, 12:44:39 pm »
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.

Ankit

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-3
    • View Profile
Re: Bindkey Help
« Reply #6 on: February 21, 2012, 02:06:26 pm »
Quote
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?
« Last Edit: February 22, 2012, 04:49:29 am by Ankit »

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: Bindkey Help
« Reply #7 on: February 22, 2012, 12:53:44 pm »
Then you forgot to add them to your script.xml, or added them wrongly.

Ankit

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-3
    • View Profile
Re: Bindkey Help
« Reply #8 on: February 23, 2012, 05:34:59 am »
i didnt forgot even a word

Hatser

  • Newbie
  • *
  • Posts: 33
  • Karma: +0/-2
  • Create it by yourself. You're not dumm.
    • View Profile
Re: Bindkey Help
« Reply #9 on: August 07, 2012, 07:44:33 pm »
you need to put it in folder named binds and add
<script folder="binds"/>
to your content.xml
« Last Edit: August 07, 2012, 07:50:08 pm by CoolBoy »

 

© Liberty Unleashed Team.