Raised This Month: $ Target: $400
 0% 

TimeLeft & ScoreMessage:


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shinya.
Member
Join Date: Jun 2017
Location: Morocco
Old 06-23-2017 , 16:46   TimeLeft & ScoreMessage:
Reply With Quote #1

Hello guys, what is the problem with my code?
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)
    


Last edited by Shinya.; 06-23-2017 at 18:31.
Shinya. is offline
Shinya.
Member
Join Date: Jun 2017
Location: Morocco
Old 06-23-2017 , 16:51   Re: TimeLeft & ScoreMessage:
Reply With Quote #2

+ want to add the score of Terrorist & CT.
Shinya. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-24-2017 , 10:36   Re: TimeLeft & ScoreMessage:
Reply With Quote #3

The id that you passed using set task is equal to 0

You retrieving the teamscore uncorrectly..
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-24-2017 , 11:34   Re: TimeLeft & ScoreMessage:
Reply With Quote #4

You're using flag "a" in the task with 0 times repeating.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Shinya.
Member
Join Date: Jun 2017
Location: Morocco
Old 06-24-2017 , 11:45   Re: TimeLeft & ScoreMessage:
Reply With Quote #5

Hmmmmm, Thanks OciXCrom, Natsheh
Shinya. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-24-2017 , 13:56   Re: TimeLeft & ScoreMessage:
Reply With Quote #6

Probably it will be the best if you stopped copying and pasting, and give it a try to understand the coding..
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Shinya.
Member
Join Date: Jun 2017
Location: Morocco
Old 06-24-2017 , 16:18   Re: TimeLeft & ScoreMessage:
Reply With Quote #7

It did not work and I just wanted to try, because this is the first time I use enum!

Last edited by Shinya.; 06-24-2017 at 16:18.
Shinya. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-24-2017 , 18:30   Re: TimeLeft & ScoreMessage:
Reply With Quote #8

your not even using the enums the problem is from your task that you're setting...
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 06-24-2017 at 19:32.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 22:56.


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