![]() |
Questions about an Inventory
1. For dropping items, how would I drop an item in the Weapon List?
Something like this? PHP Code:
PHP Code:
It only works when I'm using a default inventory. This is what I use to select items in my inventory: PHP Code:
|
You could use custom if you wanted.
For the question about dropping items, do something like this: PHP Code:
PHP Code:
|
PHP Code:
PHP Code:
|
Quote:
|
Quote:
PHP Code:
|
oh 4fog the 'join'.
how would that version work better? if anything PHP Code:
|
You can't simply drop an item from an inventory onto the ground.
What you can do, is drop an NPC like you're doing, and enclose a variable with it with the name of the weapon and delete the players item. When the player touches the item, add that weapon via addweapon. |
Why use GS1?
putnpc2( dx, dy, "join( \"item\" )" ); |
Quote:
always wonderd why people add them :confused: |
Quote:
PHP Code:
|
PHP Code:
|
Why are you doing all that looping? Send the current weapon in the triggerclient.
|
If I don't do the looping, can't find the Weapon id needed to change the image. I've tried findWeapon(), so I used the loop instead. Can you tell me why it won't display the correct images..
|
In the class, perhaps try setimg( this.img)?
Also, you might need to join it AFTER setting this.img and this.wep so that it runs the functions when this.img actually exists. |
You can still do it on the clientside.
PHP Code:
|
PHP Code:
I recall PHP Code:
|
Solved. The problem was I was supposed to access the image of the player's weapon on the clientside, and i was trying to access it off the serverside. Thanks guys!
i'll give rep when i can cause ill gave in the last 24 hours |
Quote:
Quote:
|
Quote:
And, for the record, it was a gray gem :cry: But yes, it is a good idea to give rep to the people who help you; you in return will receive good rep, for the most part. Be sure to leave your name :) And Dusty, you beast! Double posting, tssk tssk. |
Don't put the join inside the putnpc's script please. Just join it upon creation and that's it. It's unhealthy and bad tact to put commands and function calls outside of function definitions.
|
do a check serverside, sending the weapon info clientside will make it insecure.
|
| All times are GMT +2. The time now is 06:49 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.