String not printing properly.
On client_authorized i use the copy function to assign a weapon to a global variable with id as key.
PHP Code:
However, when trying to give the weapon to a player it does not always work. I printed out in the server the player id and the weapon. PHP Code:
|
Re: String not printing properly.
new g_iWep[33][ 20 ];
new g_iAmmo[33][ 20 ]; You forget the buffer since you store strings. And 20 because the max length of a weapon name is 19 (weapon_smokegrenade). |
Re: String not printing properly.
Quote:
EDIT: I guess I was too tired to realize it. |
Re: String not printing properly.
Noticed you were giving ammo via actually giving the item. You can set bp ammo using a native from cstrike.
PHP Code:
|
Re: String not printing properly.
Any advantages? Besides reducing the amount of lines written.
Might profile it later and check if there's any considerable difference in speed. |
Re: String not printing properly.
Quote:
give_item() give_item() give_item() give_item() vs one line |
| All times are GMT -4. The time now is 20:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.