AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help me! (https://forums.alliedmods.net/showthread.php?t=172810)

made.tn 11-26-2011 09:54

Help me!
 
2 Attachment(s)
Thanks for all who's help me to create this plugin

PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "play sound"
#define VERSION "1.0"
#define AUTHOR "made.tn"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_logevent("start",2,"1=Round_Start")
    
register_logevent("end",2,"1=Round_End")
    
register_logevent("welcome",2,"1=entered the game")
}

public 
plugin_precache() {
    
precache_sound("csound/roundstr.wav")
    
precache_sound("csound/roundend.wav")
    
precache_sound("csound/welcome.wav")
    return 
PLUGIN_CONTINUE
}

public 
start(id) {
    
set_hudmessage(025500.20, -1.003.01.21.31.4)
    
show_hudmessage(id"::Round start::")
    
client_cmd(0"spk csound/roundstr.wav")
    return 
PLUGIN_CONTINUE
}

public 
end(id) {
    
set_hudmessage(5520000.20, -1.003.01.21.31.4)
    
show_hudmessage(id"::round end::")
    
client_cmd(0"spk csound/roundend.wav")
    return 
PLUGIN_CONTINUE
}

public 
welcome(id) {
    
set_hudmessage(025500.20, -1.003.01.21.31.44)
    
show_hudmessage(id"Hello client!")
    
client_cmd(0"spk csound/welcome.wav")
    return 
PLUGIN_CONTINUE


now I'd like to help me to create this plugin
if you write this Command "add_hp" You get +20hp


and thanks

Snaker beatter 11-26-2011 09:57

Re: Help me!
 
set_user_health(id, get_user_health + 20)

#include <fun>

made.tn 11-26-2011 09:58

Re: Help me!
 
thanks


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

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