Raised This Month: $ Target: $400
 0% 

Plugin compile error (old plugin)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
LithuanianJack
Senior Member
Join Date: Nov 2013
Location: Vilnius, Lithuania
Old 05-17-2016 , 13:30   Re: Plugin compile error (old plugin)
Reply With Quote #9

Quote:
Originally Posted by siriusmd99 View Post
Use this one instead because you are not checking task on putinserver (+ added some optimizations and shortened the code ):
P.S. Replace mysound.wav with your sound name ....

PHP Code:
#include <amxmodx> 
#include <dhudmessage> 

#define PLUGIN "HUD MSG for VIP,Admin,Player" 
#define VERSION "1.0" 
#define AUTHOR "4iTGAME & Dim4ik" 

new const welcome_sound[] = "mysound.wav"

public plugin_precache()
{
    
register_plugin(PLUGINVERSIONAUTHOR
    
precache_sound(welcome_sound)
}

public 
client_putinserver(id){ 
    if(
task_exists(id)) 
        
remove_task(id)
    
set_task(5.0,"flappybuird",id
}

public 
flappybuird(id){ 
    new 
szName[32],iflags
    
get_user_name(idszNamecharsmax(szName)) 
    
iflags get_user_flags(id);
    
set_dhudmessage(025500.280.1606.012.0)         
    
show_dhudmessage(id"Glad to see you %s%s ! Enjoy the game.", (iflags ADMIN_LEVEL_B) ? "Administrator " : (iflags ADMIN_LEVEL_H) ? "VIP " "" ,szName
    
client_cmd(id"spk %s"welcome_sound)

That's okay, but i didn't hear the sound...
PHP Code:
new const welcome_sound[] = "myproject/mysound.wav" 
The sound location is: cstrike/sound/myproject/mysound.wav
LithuanianJack is offline
 



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 18:32.


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