Page 1 of 1

Using a custom bind to give a player a inventory item?

Posted: Mon Feb 01, 2016 8:29 pm
by Lord_of_D:
I just started a new project that i hope everyone likes and it is going pretty well, except for one thing: i need it to move by getting an "inventory item" which is supposed to be given via the common movement binds with acs, however by some reason the client always tells me that "ACS: i dont know what "x" is" and i have no idea why this happens(im using stuff from another wad as a base, and yes, im giving credit), so can somebody explain me why it happens? or give me an example of a custom bind for it:

Code: Select all

#library "BIKECONTROL"
#include "zcommon.acs"


script 522 OPEN
{
ConsoleCommand("compat_clientssendfullbuttoninfo 1");
}


//FORWARD
script 421 ENTER
{
 int buttons;

 while (TRUE)
 {
   buttons = GetPlayerInput(-1, INPUT_BUTTONS);
   
if (buttons & BT_FORWARD)
{
   GiveInventory("Accelerate", 1);
}
   delay(1);
 }
}


//BACKPEDAL
script 422 ENTER
{
 int buttons;

 while (TRUE)
 {
   buttons = GetPlayerInput(-1, INPUT_BUTTONS);
   
if (buttons & BT_BACK)
{
    GiveInventory("BackPedal", 1);
	delay(2);
	TakeInventory("BackPedal", 1);
}

   delay(2);
   TakeInventory("BackPedal", 1);
 }
}


//LEFT
script 423 ENTER
{
 int buttons;

 while (TRUE)
 {
   buttons = GetPlayerInput(-1, INPUT_BUTTONS);
   
if (buttons & BT_MOVELEFT)
{
    GiveInventory("TurnLeft", 1);
}

   delay(1);
 }
}



//RIGHT
script 424 ENTER
{
 int buttons;

 while (TRUE)
 {
   buttons = GetPlayerInput(-1, INPUT_BUTTONS);
   
if (buttons & BT_MOVERIGHT)
{
    GiveInventory("TurnRight", 1);
}

   delay(1);
 }
}

RE: Using a custom bind to give a player a inventory item?

Posted: Mon Feb 01, 2016 8:35 pm
by Sean
Make sure the items are spelt correctly and make sure the items are actually defined in DECORATE