Quote:
Originally Posted by Gunderak
basically i have a hat setup as a weapon so u equip it and press d
i want to sell it in a level with a npc.
here is the npc script but it doesnt work :/
could someone please tell me what im doing wrong :3?
thanks
gunderak
//#CLIENTSIDE
function onCreated() {
dontblock;
}
function onPlayerChats() {
if (player.chat =="/Buy Gund Dino Hat"){
if(playerrupees>=1000)
addweapon("Hats/Dino Hat");
playerrupees-=1000;
}
}
|
Same issue as your previous thread, addweapon (and presumably player.rupees) need to be used serverside, which requires a trigger.