AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   TimeLeft & ScoreMessage: (https://forums.alliedmods.net/showthread.php?t=298834)

Shinya. 06-23-2017 16:46

TimeLeft & ScoreMessage:
 
Hello guys, what is the problem with my code?
:3 sorry if it is the wrong thread!

PHP Code:

/* Script generated by Pawn Studio */

#include < amxmodx >
#include < dodx.inc >

enum {
    
XMF_DAMAGE 0,
    
XMF_DEATH,
    
XMF_SCORE,
};

public 
plugin_init( )
{
    
register_plugin"Timeleft & Team Score""b0.1""Shinya." );
    
set_task(1.0"SHOW_HUD"___"a"); 
}

public 
SHOW_HUDid )
{
    new 
szTimeLeft get_timeleft( );
    new 
szTeamScore dod_get_user_scoreid );
    
    
set_hudmessage(1651651650.340.0206.01.0)
    
show_hudmessage(id"Time's Left: %i"szTimeLeft)
    
    
set_hudmessage(255000.160.0706.01.0)
    
show_hudmessage(id"Score: %d"szTeamScore)
    



Shinya. 06-23-2017 16:51

Re: TimeLeft & ScoreMessage:
 
+ want to add the score of Terrorist & CT.

Natsheh 06-24-2017 10:36

Re: TimeLeft & ScoreMessage:
 
The id that you passed using set task is equal to 0

You retrieving the teamscore uncorrectly..

OciXCrom 06-24-2017 11:34

Re: TimeLeft & ScoreMessage:
 
You're using flag "a" in the task with 0 times repeating.

Shinya. 06-24-2017 11:45

Re: TimeLeft & ScoreMessage:
 
Hmmmmm, Thanks OciXCrom, Natsheh :D

Natsheh 06-24-2017 13:56

Re: TimeLeft & ScoreMessage:
 
Probably it will be the best if you stopped copying and pasting, and give it a try to understand the coding..

Shinya. 06-24-2017 16:18

Re: TimeLeft & ScoreMessage:
 
It did not work and I just wanted to try, because this is the first time I use enum! :|

Natsheh 06-24-2017 18:30

Re: TimeLeft & ScoreMessage:
 
your not even using the enums the problem is from your task that you're setting...


All times are GMT -4. The time now is 22:56.

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