Raised This Month: $ Target: $400
 0% 

[help] Scripting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xscript
Junior Member
Join Date: Nov 2011
Old 11-30-2011 , 07:30   [help] Scripting
Reply With Quote #1

I'm new in this forum And this is what I learn

PLUGIN1: sound player

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

#define PLUGIN "play sound"
#define VERSION "1.0"
#define AUTHOR "Xscript"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_logevent("R_start",2,"1=Round_Start")
    
register_logevent("R_end",2,"1=Round_End")
    
register_logevent("hello",2,"1=entered the game")
}

public 
plugin_precache() {
    
precache_sound("misc/Rstart.wav")
    
precache_sound("misc/Rend.wav")
    
precache_sound("misc/hello.wav")
    return 
PLUGIN_CONTINUE
}

public 
R_start(id) {
    
set_hudmessage(02550, -1.0, -1.003.01.21.31.4)
    
show_hudmessage(id"::Round start::")
    
client_cmd(id"spk misc/Rstart.wav")
    return 
PLUGIN_CONTINUE
}

public 
R_end(id) {
    
set_hudmessage(552000, -1.0, -1.003.01.21.31.4)
    
show_hudmessage(id"::Round end::")
    
client_cmd(id"spk misc/Rend.wav")
    return 
PLUGIN_CONTINUE
}

public 
hello(id) {
    
set_hudmessage(02550, -1.0, -1.003.01.21.31.44)
    
show_hudmessage(id"Hello client!")
    
client_cmd(id"spk misc/hello.wav")
    return 
PLUGIN_CONTINUE

PLUGIN2: HP Give menu

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

public plugin_init()
{
    
register_concmd("amx_hp""menu"ADMIN_ADMIN)
}

public 
menu(id)
{
    new 
menu menu_create("Menu Name""menu_handler")
    
    
menu_additem(menu"Give 100 hp ""1")
    
menu_additem(menu"Give 500 hp ""2")
    
menu_additem(menu"Give 1000 hp ""3")
    
    
menu_display(idmenu0)
}

public 
menu_handler(idmenuitem)
{
    new 
maxdata[64], maxnames[64], accesscallback
    
    menu_item_getinfo
(menuitemaccessmaxdatasizeof maxdata 1maxnamessizeof maxnames 1callback)
    
    new 
key str_to_num(maxdata)
    new 
health get_user_health(id)
    
    switch (
key)
    {
        case 
1:
        {
            
set_user_health(idhealth 100)
        }case 
2:
        {
            
set_user_health(idhealth 500)
        }case 
3:
        {
            
set_user_health(idhealth 1000)
        }
    }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

Plugin3: headshot sound

PHP Code:
#include <amxmodx>
#include <amxmisc> 
#include <hamsandwich> 
#include <fakemeta> 

public plugin_init() {
     
register_plugin("headshot20hp""1.0""Xscript")
     
RegisterHam(Ham_Killed"player""PlayerKilledPost"1)
}
public 
plugin_precache() {
    
precache_sound("misc/headshot.wav")
}

public 
PlayerKilledPost(victimattackershouldgib

    if(!
is_user_connected(attacker)) 
        return 
PLUGIN_CONTINUE

    
if(victim == attacker
        return 
PLUGIN_CONTINUE

    
if(get_pdata_int(victim75) != HIT_HEAD
        return 
PLUGIN_CONTINUE 

    client_cmd
(attacker,"spk misc/headshot.wav")
    return 
PLUGIN_HANDLED


Last edited by Xscript; 11-30-2011 at 07:43.
Xscript is offline
MyPc
Senior Member
Join Date: Sep 2011
Old 11-30-2011 , 07:34   Re: [help] For you
Reply With Quote #2

What do you want ?
Or you just like spamming -_-
MyPc is offline
Xscript
Junior Member
Join Date: Nov 2011
Old 11-30-2011 , 07:36   Re: [help] For you
Reply With Quote #3

what ??? spamming when??
Xscript is offline
Xscript
Junior Member
Join Date: Nov 2011
Old 11-30-2011 , 07:37   Re: [help] For you
Reply With Quote #4

I'm sorry I copy headshot sound from made.tn
Xscript is offline
Xscript
Junior Member
Join Date: Nov 2011
Old 11-30-2011 , 07:38   Re: [help] For you
Reply With Quote #5

made.tn is banned I knew
Xscript is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 11-30-2011 , 11:35   Re: [help] Scripting
Reply With Quote #6

made.tn = xcript?
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 11-30-2011 , 14:43   Re: [help] Scripting
Reply With Quote #7

@Xscript
If you are new on the forum, then don't rush out to post whatever you want,
In whatever section you want. Go through the forums rules carefully.
( For example: Use the edit button, don't double & triple post. )

Secondly this section is scripting help.
Is there anything wrong with the plugins or why did you post them here?
Give us some information so we can understand what you're doing.
Seems like you're just spamming if you leave the thread like this.


And btw:
The third plugin is a really ugly piece of shit...

Why include hamsandwich and fakemeta?
The core already provides you with the exactly same information ( Without needing any fakemeta )
And using Hamsandwich for this isn't necessary.

Last edited by Erox902; 11-30-2011 at 19:05.
Erox902 is offline
Reply


Thread Tools
Display Modes

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 08:26.


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