![]() |
Quote:
PHP Code:
You never actually set anywhere in any of your script what this.item is. but if you did trying PHP Code:
PHP Code:
Edit: It also seems to me like you almost by Habit use @ at the start of variables for example PHP Code:
PHP Code:
|
It is a habit to write @ before variables. ><
I dont know why. >_< But, anyway, this.item is set in the level script as this.item = "Guns/Tommy Gun"; And it still doesnt work, even after your fixes. -.- |
Quote:
|
Quote:
|
Ok, heres the npc in the level:
HTML Code:
this.join("shops"); The shops class: HTML Code:
//#CLIENTSIDE The -shop npc: HTML Code:
function onActionServerside(){ |
Quote:
I just "modified" some of the script and added another way to add the weapon to the player (public functions in wnpcs) level npc PHP Code:
PHP Code:
PHP Code:
instead of using triggeractions to get to an other wnpc, use triggeraction to get serverside in the class, then trigger to the wnpc using the magic of object-oriented and public functions |
Still wont work. =/
Its the triggeraction that isnt working...cause, if you replace ShopFunctions.addShopItem(params[1]); with player.chat = "Test"; Nothing happens, so there is a problem in the triggeraciotn. -.- |
It would be params[0] wouldn't it? either do addWeapon(params[0]) or addWeapon(temp.item)
|
most of the corrections made are right but not put into the script correctly
|
Quote:
|
Quote:
first: I changed the styling and some vars from the original (your script), but didn't see this: PHP Code:
PHP Code:
second: change addWeapon(params[1]); to addWeapon(item); in ShopFunctions, I was using params[1] because I was thinking of the class (params[1] was the item there) class "shops": PHP Code:
PHP Code:
Quote:
should be addWeapon(item); in ShopFunctions Quote:
|
w00t go Chompy
|
Quote:
PHP Code:
|
I've used it both ways it really depends on what the scripts are for (GUIs and chests for example)
|
All times are GMT +2. The time now is 03:02 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.