Simple code doesn't work
222I couldn't understand why this code doesn't work:
//---code #include <amxmodx> #include <fun> #include <engine> #include <cstrike> #define PLUGIN "D" #define VERSION "1.0" #define AUTHOR "Spin7ion" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("ResetHUD", "event_spawn", "a") } public event_spawn(id) { set_hudmessage(255, 255, 0, 0.60, 0.93, 0, 6.0, 12.0) show_hudmessage(id, "D is using") strip_user_weapons(id) give_item(id, "weapon_p90") } //---code It must give player P90 on round start. I also try HLTV event, but it didn't work. Please help. |
Re: Simple code doesn't work
ResetHud is not a global event ( "a" ) ...
Try "be". http://www.amxmodx.org/funcwiki.php?...vent&go=search But to give a weapon on round start, you should use HLTV event with a little delay. Code:
|
Re: Simple code doesn't work
PHP Code:
|
Re: Simple code doesn't work
Using fakemeta instead of fun. This way is better.
Code:
|
Re: Simple code doesn't work
You still forgot :D
PHP Code:
|
Re: Simple code doesn't work
what.
|
Re: Simple code doesn't work
Thank you.
But I have one more question: When I try to give player a gun, server crashes. PHP Code:
|
Re: Simple code doesn't work
fm_give_item( iPid, "weapon_p90" );
You change that part of this script to fm_give_item( iPid, "weapon_ak47" ); if you want 2 or more type fm_give_item( iPid, "weapon_ak47" ); fm_give_item( iPid, "weapon_m4a1" ); |
Re: Simple code doesn't work
What is the point of having
PHP Code:
|
Re: Simple code doesn't work
ammo classnames are not ammo_*
(* being weapon name) its actually the type of ammo, not the gun its for http://wiki.amxmodx.org/CS_Weapons_Information |
| All times are GMT -4. The time now is 11:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.