Author Topic: Guns Bind  (Read 884 times)

Is there something wrong with this:
It seems that it doesnt work, can someone please fix this:
Code: [Select]
if (!$addedToolKeys)
{
$remapDivision[$remapCount] = "Weapon Binds";
$remapName[$remapCount] = "Use Gun";
$remapCmd[$remapCount] = "useGun";
$remapCount++;
$remapName[$remapCount] = "Use Guns Akimbo";
$remapCmd[$remapCount] = "useAkimboGun";
$remapCount++;
        $addedToolKeys = true;
}

function useGun(%on)

{
if(!%on){return;}
  commandtoserver('gun');
}

function useGun(%on)

{
if(!%on){return;}
  commandtoserver('gun');
}

function useAkimboGun(%on)
{
if(!%on){return;}
commandtoserver('AkimboGun');
}

function useAkimboGun(%on)
{
if(!%on){return;}
commandtoserver('AkimboGun');
}

Why do you have the same function twice?
And do you even have a serverCmdGun and serverCmdAkimboGun?
Also the spaces between if and (, as well and the lines between function and { might be causing problems

so you're making a server-sided keybind to pull out a gun .. ?

not to mention you have two repeated (and useless) functions

does this not make sense to anybody else or is it just me?

Well can you guys fix it and copy paste it here?

Well can you guys fix it and copy paste it here?


can you tell us what you're trying to do first?

it sounds like you're trying to make a keybind that pulls out a gun. this is for use on your own server, correct? (because if not I have some bad news for you AKA it won't work)

servercmdGun and servercmdAkimboGun do not exist.

Space killed his hope.

Anyother ways to do Space?

Possibly something like checking each GUI item slot for the right kind, but I don't think you can just check for "GunItem" since the names aren't sent by the server. Checking the uiNames might work. Then you do commandtoserver('usetool',number);