| fatalerror23 |
09-12-2012 18:54 |
[FIX] Plugin box help me
PHP Code:
#include <amxmodx> #include <cstrike> #define PLUGIN "EvL.G | Esconde [NEW]" #define VERSION "0.1" #define AUTHOR "Smurff Edited : FaTaL" new iFF, iHandler new time_s public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) iFF = get_cvar_pointer( "sv_gravity" ) iHandler = get_pcvar_num( iFF ) register_clcmd( "say /esconde", "cmdBox", "hudmensage" ) } public cmdBox( id ) { if( !is_user_connected( id ) || !is_user_alive( id ) || cs_get_user_team( id ) != CS_TEAM_CT ) { return PLUGIN_HANDLED } switch( iHandler ) { case 0: { server_cmd( "sv_gravity 100" ) server_cmd( "amx_lights b" ) set_hudmessage(0, 255, 0, -1.0, 0.25, 0, 6.0, 12.0) show_hudmessage(id, "[ EvL.G ] Esconde Ativado") } case 1: { server_cmd( "sv_gravity 800" ) server_cmd( "amx_lights off" ) set_hudmessage(255, 0, 0, -1.0, 0.25, 0, 6.0, 12.0) show_hudmessage(id, "[ EvL.G ] Esconde Desativado") } }
public hudmensage() { set_task(1.0, "test_countdown") time_s = 60 }
public test_countdown() { set_hudmessage(0, 255, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10); show_hudmessage(0, "[ EvL.G ] Segundos para Esconde %i", time_s); --time_s;
if(time_s >= 1) { set_task(1.0, "test_countdown") }
iHandler = !iHandler return PLUGIN_CONTINUE }
have errors resolve please
|