Quote:
Originally Posted by cbk1994
It's possible to remove weapons clientside (this.destroy() in the weapon—DO NOT DO THIS SERVERSIDE, IT WILL DELETE THE WEAPON FROM THE SERVER) but to add weapons you need to use player.addWeapon(weapon_name) and that must be done serverside. To remove weapons from a player serverside, use player.removeWeapon(weapon_name).
|
i'm trying to make it a key pressed but I don't know how to do that for serverside would it be
NPC Code:
function onKeyPressed(code, key) {
if (key == "t") {
player.addWeapon(weapon_name);
player.removeWeapon(weapon_name);
or how could I make it a function that the client side does and plays the serverside function
like this
NPC Code:
function onTierUp() {
player.addWeapon(weapon_name);
player.removeWeapon(weapon_name);
//#CLIENTSIDE
function onKeyPressed(code, key) {
if (key == "t") {
onTierUp():
}
}
I tried doing that before but it couldn't read the function