View Single Post
  #16  
Old 04-28-2007, 07:01 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by oo_jazz_oo View Post
One last thing. ><
I cant get the weapon to add to the player. =/
I have tried everything....whats wrong with this?
My guess is this little bit right here

PHP Code:
triggeraction(0,0,"serverside","-Shop","addw",@this.item); 
for one you dont need the @ at the start of the param, nor do you need it on the serverside (addweapon).
You never actually set anywhere in any of your script what this.item is.

but if you did trying

PHP Code:
triggeraction(00"serverside""-Shop""addw"thiso.item); 
and

PHP Code:
function onActionServerside() {
 if (
params[0] == "addw") {
  
addweapon(params[1]);
 }

was what you were looking for?

Edit:

It also seems to me like you almost by Habit use @ at the start of variables for example

PHP Code:
if (client.money >=@this.price){ 
Might not work? Anyways that could/should be rewritten as

PHP Code:
if (client.money >= this.price){ 
__________________
Reply With Quote