- #include <zombie_escape>
- #include <cstrike>
- #define _PLUGIN "Darkness"
- #define _COST 30
- #define _VERSION "1.0"
- #define _AUTHOR "H.RED.ZONE"
- new _gItemID
- public plugin_init( ) {
- register_plugin( _PLUGIN, _VERSION, _AUTHOR )
- _gItemID = ze_register_item( _PLUGIN, _COST )
- }
- public ze_select_item_post( plr, _itemid) {
- if ( _itemid == _gItemID ) {
- if( is_user_alive(plr) ) {
- server_cmd( "ze_lighting_style a" )
- set_hudmessage( 255, 0, 0, 0.25, 0.46, 0, 6.0, 12.0 )
- show_hudmessage( 0, "Player bought DARKNESS for 15 sec" )
- set_task( 15.0 , "_FW_RemoveDarkness", plr )
- }
- }
- return ZE_ITEM_AVAILABLE;
- }
- public ze_select_item_pre(plr, _itemid)
- {
- // Return Available and we will block it in Post, So it dosen't affect other plugins
- if (_itemid != _gItemID)
- return ZE_ITEM_AVAILABLE
- // Available for zombies only
- if (!ze_is_user_zombie(plr))
- return ZE_ITEM_DONT_SHOW
- return ZE_ITEM_AVAILABLE
- }
- public _FW_RemoveDarkness( plr ) {
- server_cmd("ze_lighting_style z")
- set_hudmessage(255, 0, 0, 0.25, 0.46, 0, 6.0, 12.0)
- show_hudmessage(0, "DARKNESS IS GONE.")
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
- */
Code error
Code error
LOL
You missed to add the limit when you register the item,
change
change
ze_register_item( _PLUGIN, _COST )
to ze_register_item( _PLUGIN, _COST, 0)
He who fails to plan is planning to fail
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: No registered users and 2 guests