View Single Post
  #9  
Old 06-19-2013, 01:48 AM
defaultaccount defaultaccount is offline
Cassini
Join Date: Feb 2006
Location: HeLLifAX
Posts: 299
defaultaccount is on a distinguished road
is it proper otherwise? i'll try adding quotes I forgot to add them above ill add the quotes and see if that helps but other than that it should trigger the weapon change?

edit: I got it working, it added the gun but it didn't remove it ill test it out more later but it triggered the server side weapons change thank you cbk youre very helpful here on the forums

I cant get it to remove the weapon I have it set up like this

Quote:
function onActionServerSide() {
player.addWeapon("weapon/BMPTier1");
player.removeWeapon("weapon/BMP");
}
//#CLIENTSIDE
function GraalControl.onKeyDown(code, key, scan) {
if (key == "t") {
triggerServer("gui", this.name, null);
im going to try to do it with destroy clientside

I got it working with destroy(weapon/bmp); thanks cbk uve been very helpful

now i'm trying to make it so it can go down in level how would I be able to do that, I have it right now like it shows above but I want to make a trigger for a key to make it add the previous gun

NPC Code:
 
function onActionServerSide() {
player.addWeapon("Weapon/BMPTier3");
}
function onActionServerSide() {
player.addWeapon("Weapon/BMPTier1");
}
//#CLIENTSIDE
function GraalControl.onKeyDown(code, key, scan) {
if (key == "t") {
freezeplayer(this.equip);
triggerServer("gui", this.name, null);
destroy(Weapon/BMPTier2);
}
if (key == "g") {
freezeplayer(this.equip);
triggerServer("gui", this.name, null);
destroy(Weapon/BMPTier2);
}
}



basicly im wondering how to make it so it has two sever side triggers, I can currently can only make it have one serverside trigger I don't know how make it work...

Last edited by defaultaccount; 06-19-2013 at 03:49 AM..
Reply With Quote