Raised This Month: $ Target: $400
 0% 

I have error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 08-09-2010 , 09:10   I have error
Reply With Quote #1

I try to do hud messege what show how much time lef to play.
That's my error.
PHP Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// timelimit.sma
// C:\Program Files\Counter-strike\cstrike\addons\amxmodx\scripting\timelimit.sm
a(16) : warning 217loose indentation
// C:\Program Files\Counter-strike\cstrike\addons\amxmodx\scripting\timelimit.sm
a(16) : error 029invalid expressionassumed zero
// C:\Program Files\Counter-strike\cstrike\addons\amxmodx\scripting\timelimit.sm
a(16) : error 017undefined symbol "Timelimite"
// C:\Program Files\Counter-strike\cstrike\addons\amxmodx\scripting\timelimit.sm
a(18) : error 017undefined symbol "id"
// C:\Program Files\Counter-strike\cstrike\addons\amxmodx\scripting\timelimit.sm
a(19) : error 029invalid expressionassumed zero
//
// 4 Errors.
// Could not locate output file C:\Program Files\Counter-strike\cstrike\addons\a
mxmodx\scripting\compiled\timelimit.amx (compile failed).
//
// Compilation Time: 0.08 sec
// ----------------------------------------

Press enter to exit ... 
That's my code
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Timelimit"
#define VERSION "1.0"
#define AUTHOR "ZiruAl"


public client_init()
{
    
register_clcmd"say time""Timelimite" ); 
    
register_clcmd"say /time""Timelimite" );
    
register_clcmd"say_team time""Timelimite" );  
    
register_clcmd"say_team /time""Timelimite" );  

public 
Timelimiteid )
{
    if( 
is_user_aliveid ))
    
set_hudmessage(2002552550.700.006.0,)
}

zirualas is offline
Send a message via Skype™ to zirualas
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 08-09-2010 , 09:52   Re: I have error
Reply With Quote #2

Something like this...

Code:
#include <amxmodx> #define PLUGIN "Timelimit" #define VERSION "1.0" #define AUTHOR "ZiruAl" new timelimit public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd( "say time", "Timelimite" );     register_clcmd( "say /time", "Timelimite" );     register_clcmd( "say_team time", "Timelimite" );       register_clcmd( "say_team /time", "Timelimite" );         timelimit = get_cvar_pointer("mp_timelimit") } public Timelimite( id ) {     if( is_user_alive( id ))     {         set_hudmessage(200, 255, 255, 0.70, 0.0, 0, 6.0)         show_hudmessage(id, "Timeleft: %i", get_pcvar_num(timelimit) - floatround(get_gametime() / 60)  )     } }
__________________

Last edited by DarkGod; 08-09-2010 at 09:55.
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 08-09-2010 , 11:04   Re: I have error
Reply With Quote #3

Thank you .
Now 1 more question how i can do it shows not time limit but show's task time. Etc. My player select a no clip for 5 seconds and hud shows hhow much time he have .
zirualas is offline
Send a message via Skype™ to zirualas
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 08-09-2010 , 15:23   Re: I have error
Reply With Quote #4

You have to do a countdown.
Mxnn is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 08-10-2010 , 03:35   Re: I have error
Reply With Quote #5

What's command of this "Countdown".
I search in amxmodx.org, nothing
zirualas is offline
Send a message via Skype™ to zirualas
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 08-10-2010 , 06:17   Re: I have error
Reply With Quote #6

here is explained how to make a countdown:
http://forums.alliedmods.net/showthread.php?t=130616
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 08-10-2010 , 06:33   Re: I have error
Reply With Quote #7

I don't undestond, how i can do this effect when I type /time .
zirualas is offline
Send a message via Skype™ to zirualas
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 08-10-2010 , 22:01   Re: I have error
Reply With Quote #8

This works perfectly:
PHP Code:
public CountDown(id) {
if (
is_user_connected(id)) {
        
set_hudmessage(147147147, -1.00.8116.01.50.20.21)
        
        if (
respawn_counter[id] > 
        
show_hudmessage(id"Finish in %i seconds"respawn_counter[id])
    
        if (
respawn_counter[id] == 0) {
            
// The countdown finish
            
respawn_counter[id] = 5
        
}    
        else {
            
set_task(0.9"CountDown"id)
            
respawn_counter[id]--
        }    
    }
    
    return

Change messages & stuff

respawn_counter[] is a global var with 33 cells (1 for each player)

Last edited by Mxnn; 08-11-2010 at 12:16.
Mxnn is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:16.


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