AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [FIX] Plugin box help me (https://forums.alliedmods.net/showthread.php?t=195897)

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 iFFiHandler
new time_s
 
public plugin_init() { 
register_plugin(PLUGINVERSIONAUTHOR
iFF get_cvar_pointer"sv_gravity" )
 
iHandler get_pcvar_numiFF 
 
register_clcmd"say /esconde""cmdBox""hudmensage" )

 
public 
cmdBoxid ) { 
if( !
is_user_connectedid ) || !is_user_aliveid ) || cs_get_user_teamid ) != CS_TEAM_CT ) { 
return 
PLUGIN_HANDLED 

 
switch( 
iHandler ) { 
case 
0: { 
server_cmd"sv_gravity 100" 
server_cmd"amx_lights b" )
set_hudmessage(02550, -1.00.2506.012.0
show_hudmessage(id"[ EvL.G ] Esconde Ativado"

case 
1: { 
server_cmd"sv_gravity 800" 
server_cmd"amx_lights off" )
set_hudmessage(25500, -1.00.2506.012.0
show_hudmessage(id"[ EvL.G ] Esconde Desativado"

}

public 
hudmensage()
{
    
set_task(1.0"test_countdown")
    
time_s 60
}

public 
test_countdown()

    
set_hudmessage(02550, -1.00.2820.021.00.010.110); 
    
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

Liverwiz 09-12-2012 19:39

Re: [FIX] Plugin box help me
 
how many times are people going to post. "here's my code. It has errors. Fix it" while we respond "what are the errors"

Question: how the hell are we supposed to "fix" your code if you DON'T KNOW WHATS BROKEN!?
</rant>

1 error is you need to close your cmdBox's function brackets.
You might see this if you USED WHITESPACE!


All times are GMT -4. The time now is 08:14.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.