Raised This Month: $ Target: $400
 0% 

3in1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hAwKaZ
Junior Member
Join Date: Sep 2006
Old 01-04-2009 , 09:00   3in1
Reply With Quote #1

Hey, how to make 1 plugin from 3. I'm getting errors And also, something wrong with #2 plugins print_adminlist or handle_say. Thanks for help

1. VIP 0.1 Dunn0
Code:
#define DAMAGE_RECIEVED
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

new mpd, mkb, mhb
new maxplayers
new g_MsgSync
new health_add
new health_hs_add
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max

#if defined DAMAGE_RECIEVED
    new g_MsgSync2
#endif

public plugin_init()
{
    register_plugin("VIP part1", "2.0", "Dunno")
    mpd = register_cvar("money_per_damage","2")
    mkb = register_cvar("money_kill_bonus","300")
    mhb = register_cvar("money_hs_bonus","100")
    health_add = register_cvar("amx_vip_hp", "10")
    health_hs_add = register_cvar("amx_vip_hp_hs", "15")
    health_max = register_cvar("amx_vip_max_hp", "100")

    register_event("Damage","Damage","b")
    register_event("DeathMsg","death_msg","a")
    register_logevent("logevent_Round_Start", 2, "1=Round_Start");
    register_event("DeathMsg", "hook_death", "a", "1>0")

    maxplayers = get_maxplayers()

    register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")

    g_MsgSync = CreateHudSyncObj()

#if defined DAMAGE_RECIEVED
    g_MsgSync2 = CreateHudSyncObj()
#endif
}

public on_damage(id)
{
    new attacker = get_user_attacker(id)

#if defined DAMAGE_RECIEVED
    // id should be connected if this message is sent, but lets check anyway
    if ( is_user_connected(id) && is_user_connected(attacker) )
    if (get_user_flags(attacker) & ADMIN_LEVEL_H)
    {
        new damage = read_data(2)

        set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
        ShowSyncHudMsg(id, g_MsgSync2, "%i^n", damage)
#else
    if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) )
    {
        new damage = read_data(2)
#endif
        set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
        ShowSyncHudMsg(attacker, g_MsgSync, "%i^n", damage)
    }
}

public Damage(id)
{
    new weapon, hitpoint, attacker = get_user_attacker(id,weapon,hitpoint)
    if(attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
    if (get_user_flags(attacker) & ADMIN_LEVEL_H) 
    {
        new money = read_data(2) * get_pcvar_num(mpd)
        if(hitpoint==1) money += get_pcvar_num(mhb)
        cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
    }
}

public death_msg()
{
    if(read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300)
}

public logevent_Round_Start()
{
    new players[32], player, pnum;
    get_players(players, pnum, "a");
    for(new i = 0; i < pnum; i++)
    {
        player = players[i];
        if(get_user_flags(player) & ADMIN_LEVEL_H)
        {
            give_item(player, "weapon_hegrenade");
            give_item(player, "weapon_flashbang");
            give_item(player, "weapon_flashbang");
            give_item(player, "weapon_smokegrenade");
            give_item(player, "item_kevlar");
       give_item(player, "item_assaultsuit");
       give_item(player, "item_thighpack");
        }
    }
}

public hook_death()
{
   // Killer id
   nKiller = read_data(1)
   
   if ( (read_data(3) == 1) && (read_data(5) == 0) )
   {
      nHp_add = get_pcvar_num (health_hs_add)
   }
   else
      nHp_add = get_pcvar_num (health_add)
   nHp_max = get_pcvar_num (health_max)
   // Updating Killer HP
   if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
   return;

   nKiller_hp = get_user_health(nKiller)
   nKiller_hp += nHp_add
   // Maximum HP check
   if (nKiller_hp > nHp_max) nKiller_hp = nHp_max
   set_user_health(nKiller, nKiller_hp)
   // Hud message "Healed +15/+30 hp"
   set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
   show_hudmessage(nKiller, "Healed +%d hp", nHp_add)
   // Screen fading
   message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)
   write_short(1<<10)
   write_short(1<<10)
   write_short(0x0000)
   write_byte(0)
   write_byte(0)
   write_byte(200)
   write_byte(75)
   message_end()
 
}
2. VIP 0.2 Dunn0

Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
static const COLOR[] = "^x04" //green
new maxplayers
new gmsgSayText
#define PLUGIN "VIP part2"
#define VERSION "2.0v"
#define AUTHOR "Dunno"
#define Keysrod (1<<0)|(1<<1)|(1<<9) // Keys: 1234567890
new round = 1
public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)    
    register_menucmd(register_menuid("rod"), Keysrod, "Pressedrod")
    register_logevent("logevent_Round_Start", 2, "1=Round_Start")
        register_event("CurWeapon", "event_CurWeapon", "be", "1=1")
        register_event("CurWeapon", "event_CurWeaponn", "be", "1=1")
        register_event("CurWeapon", "event_CurWeaponnn", "be", "1=1")
    maxplayers = get_maxplayers()
    gmsgSayText = get_user_msgid("SayText")
    register_clcmd("say", "handle_say")
    // Add your code here...
}
public logevent_Round_Start() {
    round++;
    
    new players[32], player, pnum;
    get_players(players, pnum, "a");
    for(new i = 0; i < pnum; i++)
    {
        player = players[i];
        set_user_gravity(player,1.0)
        if(get_user_flags(player) & ADMIN_LEVEL_H)
        {
            if(round > 3) Showrod(player)
        }
    }
}

public Showrod(id) {
    show_menu(id, Keysrod, "Free VIP Guns^n\w1. Get M4A1+Deagle ^n\w2. Get AK47+Deagle^n0. Exit^n", -1, "rod") // Display menu
}
public Pressedrod(id, key) {
    /* Menu:
    * VIP Menu
    * 1. Get M4A1+Deagle
    * 2. Get AK47+Deagle
    * 0. Exit
    */
    switch (key) {
        case 0: { 
            strip_user_weapons (id)
            give_item(id,"weapon_m4a1")
            give_item(id,"ammo_556nato")
            give_item(id,"ammo_556nato")
            give_item(id,"ammo_556nato")
            give_item(id,"weapon_deagle")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"weapon_knife")
            give_item(id,"weapon_hegrenade")
            client_print(id, print_center, "You Taked Free M4A1 and Deagle")
        }
        case 1: { 
            strip_user_weapons (id)
            give_item(id,"weapon_ak47")
            give_item(id,"ammo_762nato")
            give_item(id,"ammo_762nato")
            give_item(id,"ammo_762nato")
            give_item(id,"weapon_deagle")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"weapon_knife")
            give_item(id,"weapon_hegrenade")
            client_print(id, print_center, "You Taked Free AK47 and Deagle")
        }
        case 9: { // 0
            
        }
    }
    return PLUGIN_CONTINUE
}

public handle_say(id) {
    new said[192]
    read_args(said,192)
    if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/vips") != -1 )
        set_task(0.1,"print_adminlist",id)
    return PLUGIN_CONTINUE
}

public print_adminlist(user) 
{
    new adminnames[33][32]
    new message[256]
    new id, count, x, len
    
    for(id = 1 ; id <= maxplayers ; id++)
        if(is_user_connected(id))
            if(get_user_flags(id) & ADMIN_LEVEL_H)
                get_user_name(id, adminnames[count++], 31)

    len = format(message, 255, "%s VIPs ONLINE: ",COLOR)
    if(count > 0) {
        for(x = 0 ; x < count ; x++) {
            len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
            if(len > 96 ) {
                print_message(user, message)
                len = format(message, 255, "%s ",COLOR)
            }
        }
        print_message(user, message)
    }
    else {
        len += format(message[len], 255-len, "No VIPs online.")
        print_message(user, message)
    }
}

print_message(id, msg[]) {
    message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
    write_byte(id)
    write_string(msg)
    message_end()
}
3. My mini plugin
Code:
#include <amxmodx>
#include <amxmisc>

public admin_motd(id,level,cid) {

    if (!cmd_access(id,level,cid,1))
    return PLUGIN_CONTINUE
    
    show_motd(id,"vip.txt","VIP")
    return PLUGIN_CONTINUE   
}

public plugin_init() {

    register_plugin("say /noriuvip","1.0","wkha")
    register_clcmd("say /noriuvip","admin_motd",0,"- Shows the MOTD.")
}
hAwKaZ is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 01-04-2009 , 09:09   Re: 3in1
Reply With Quote #2

IMO that plugin is horrible, or at least looks horrible. Did you write something in these 2 first codes or is this original codes?
__________________
hleV is offline
hAwKaZ
Junior Member
Join Date: Sep 2006
Old 01-04-2009 , 12:02   Re: 3in1
Reply With Quote #3

First and second codes are original I only removed some ***** lines
hAwKaZ is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 01-05-2009 , 11:13   Re: 3in1
Reply With Quote #4

I just make it 1, didn't looked through the code...
PHP Code:
#define DAMAGE_RECIEVED
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

new mpdmkbmhb
new maxplayers
new g_MsgSync
new health_add
new health_hs_add
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max

#if defined DAMAGE_RECIEVED
    
new g_MsgSync2
#endif

static const COLOR[] = "^x04"

new gmsgSayText
#define PLUGIN "VIP part2"
#define VERSION "2.0v"
#define AUTHOR "Dunno"
#define Keysrod (1<<0)|(1<<1)|(1<<9) // Keys: 1234567890
new round 1

public plugin_init()
{
    
register_plugin("VIP part1""2.0""Dunno")
    
mpd register_cvar("money_per_damage","2")
    
mkb register_cvar("money_kill_bonus","300")
    
mhb register_cvar("money_hs_bonus","100")
    
health_add register_cvar("amx_vip_hp""10")
    
health_hs_add register_cvar("amx_vip_hp_hs""15")
    
health_max register_cvar("amx_vip_max_hp""100")

    
register_menucmd(register_menuid("rod"), Keysrod"Pressedrod")
    
register_logevent("logevent_Round_Start"2"1=Round_Start")
    
register_event("CurWeapon""event_CurWeapon""be""1=1")

    
register_event("Damage","Damage","b")
    
register_event("DeathMsg","death_msg","a")
    
register_event("DeathMsg""hook_death""a""1>0")

    
maxplayers get_maxplayers()

    
register_event("Damage""on_damage""b""2!0""3=0""4!0")

    
register_clcmd("say /noriuvip","admin_motd",0,"- Shows the MOTD.")

    
g_MsgSync CreateHudSyncObj()

#if defined DAMAGE_RECIEVED
    
g_MsgSync2 CreateHudSyncObj()
#endif
}

public 
on_damage(id)
{
    new 
attacker get_user_attacker(id)

#if defined DAMAGE_RECIEVED
    // id should be connected if this message is sent, but lets check anyway
    
if ( is_user_connected(id) && is_user_connected(attacker) )
    if (
get_user_flags(attacker) & ADMIN_LEVEL_H)
    {
        new 
damage read_data(2)

        
set_hudmessage(255000.450.5020.14.00.10.1, -1)
        
ShowSyncHudMsg(idg_MsgSync2"%i^n"damage)
#else
    
if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) )
    {
        new 
damage read_data(2)
#endif
        
set_hudmessage(0100200, -1.00.5520.14.00.020.02, -1)
        
ShowSyncHudMsg(attackerg_MsgSync"%i^n"damage)
    }
}

public 
Damage(id)
{
    new 
weaponhitpointattacker get_user_attacker(id,weapon,hitpoint)
    if(
attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
    if (
get_user_flags(attacker) & ADMIN_LEVEL_H
    {
        new 
money read_data(2) * get_pcvar_num(mpd)
        if(
hitpoint==1money += get_pcvar_num(mhb)
        
cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
    }
}

public 
death_msg()
{
    if(
read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300)
}

public 
hook_death()
{
   
// Killer id
   
nKiller read_data(1)
   
   if ( (
read_data(3) == 1) && (read_data(5) == 0) )
   {
      
nHp_add get_pcvar_num (health_hs_add)
   }
   else
      
nHp_add get_pcvar_num (health_add)
   
nHp_max get_pcvar_num (health_max)
   
// Updating Killer HP
   
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
   return;

   
nKiller_hp get_user_health(nKiller)
   
nKiller_hp += nHp_add
   
// Maximum HP check
   
if (nKiller_hp nHp_maxnKiller_hp nHp_max
   set_user_health
(nKillernKiller_hp)
   
// Hud message "Healed +15/+30 hp"
   
set_hudmessage(02550, -1.00.1501.01.00.10.1, -1)
   
show_hudmessage(nKiller"Healed +%d hp"nHp_add)
   
// Screen fading
   
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, nKiller)
   
write_short(1<<10)
   
write_short(1<<10)
   
write_short(0x0000)
   
write_byte(0)
   
write_byte(0)
   
write_byte(200)
   
write_byte(75)
   
message_end()
 
}

public 
logevent_Round_Start() {
    
round++;
    
    new 
players[32], playerpnum;
    
get_players(playerspnum"a");
    
    for(new 
0pnumi++)
    {
        
player players[i];
        
set_user_gravity(player,1.0)
        
        if(
get_user_flags(player) & ADMIN_LEVEL_H)
        {
            
give_item(player"weapon_hegrenade");
            
give_item(player"weapon_flashbang");
            
give_item(player"weapon_flashbang");
            
give_item(player"weapon_smokegrenade");
            
give_item(player"item_kevlar");
            
give_item(player"item_assaultsuit");
            
give_item(player"item_thighpack");
        }
        if(
get_user_flags(player) & ADMIN_LEVEL_H)
            if(
round 3Showrod(player)
    }
    
}

public 
Showrod(id) {
    
show_menu(idKeysrod"Free VIP Guns^n\w1. Get M4A1+Deagle ^n\w2. Get AK47+Deagle^n0. Exit^n", -1"rod"// Display menu
}
public 
Pressedrod(idkey) {
    
/* Menu:
    * VIP Menu
    * 1. Get M4A1+Deagle
    * 2. Get AK47+Deagle
    * 0. Exit
    */
    
switch (key) {
        case 
0: { 
            
strip_user_weapons (id)
            
give_item(id,"weapon_m4a1")
            
give_item(id,"ammo_556nato")
            
give_item(id,"ammo_556nato")
            
give_item(id,"ammo_556nato")
            
give_item(id,"weapon_deagle")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"weapon_knife")
            
give_item(id,"weapon_hegrenade")
            
client_print(idprint_center"You Taked Free M4A1 and Deagle")
        }
        case 
1: { 
            
strip_user_weapons (id)
            
give_item(id,"weapon_ak47")
            
give_item(id,"ammo_762nato")
            
give_item(id,"ammo_762nato")
            
give_item(id,"ammo_762nato")
            
give_item(id,"weapon_deagle")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"weapon_knife")
            
give_item(id,"weapon_hegrenade")
            
client_print(idprint_center"You Taked Free AK47 and Deagle")
        }
        case 
9: { // 0
            
        
}
    }
    return 
PLUGIN_CONTINUE
}

public 
handle_say(id) {
    new 
said[192]
    
read_args(said,192)
    if( ( 
containi(said"who") != -&& containi(said"admin") != -) || contain(said"/vips") != -)
        
set_task(0.1,"print_adminlist",id)
    return 
PLUGIN_CONTINUE
}

public 
print_adminlist(user
{
    new 
adminnames[33][32]
    new 
message[256]
    new 
idcountxlen
    
    
for(id id <= maxplayers id++)
        if(
is_user_connected(id))
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
                
get_user_name(idadminnames[count++], 31)

    
len format(message255"%s VIPs ONLINE: ",COLOR)
    if(
count 0) {
        for(
count x++) {
            
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":"")
            if(
len 96 ) {
                
print_message(usermessage)
                
len format(message255"%s ",COLOR)
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"No VIPs online.")
        
print_message(usermessage)
    }
}

print_message(idmsg[]) {
    
message_begin(MSG_ONEgmsgSayText, {0,0,0}, id)
    
write_byte(id)
    
write_string(msg)
    
message_end()
}

public 
admin_motd(id,level,cid) {

    if (!
cmd_access(id,level,cid,1))
    return 
PLUGIN_CONTINUE
    
    show_motd
(id,"vip.txt","VIP")
    return 
PLUGIN_CONTINUE   

__________________

anakin_cstrike is offline
hAwKaZ
Junior Member
Join Date: Sep 2006
Old 01-05-2009 , 11:43   Re: 3in1
Reply With Quote #5

ERROR:
[IMG]http://img179.**************/img179/5757/errorhg1.th.jpg[/IMG]

Last edited by hAwKaZ; 01-05-2009 at 11:46.
hAwKaZ is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 01-05-2009 , 12:11   Re: 3in1
Reply With Quote #6

You forgot the '#' from begin.
__________________

anakin_cstrike is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-05-2009 , 14:07   Re: 3in1
Reply With Quote #7

Hey,

1. Plugin : 1 error
2. Plugin : 1 error
3. Plugin : ok

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define DAMAGE_RECIEVED

#define PLUGIN "VIP part2"
#define VERSION "2.0v"
#define AUTHOR "Dunno"
#define Keysrod (1<<0)|(1<<1)|(1<<9) // Keys: 1234567890
new round 1
static const COLOR[] = "^x04" //green
new maxplayers
new gmsgSayText
new mpdmkbmhb
new g_MsgSync
new health_add
new health_hs_add
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max

#if defined DAMAGE_RECIEVED
    
new g_MsgSync2
#endif

public plugin_init()
{
    
register_plugin("say /noriuvip","1.0","wkha")
    
register_clcmd("say /noriuvip","admin_motd",0,"- Shows the MOTD.")

    
register_plugin(PLUGINVERSIONAUTHOR)    
    
register_menucmd(register_menuid("rod"), Keysrod"Pressedrod")
    
register_logevent("logevent_Round_Start"2"1=Round_Start")
    
register_event("CurWeapon""event_CurWeapon""be""1=1")
    
register_event("CurWeapon""event_CurWeaponn""be""1=1")
    
register_event("CurWeapon""event_CurWeaponnn""be""1=1")
    
maxplayers get_maxplayers()
    
gmsgSayText get_user_msgid("SayText")
    
register_clcmd("say""handle_say")
    
// Add your code here...

    
register_plugin("VIP part1""2.0""Dunno")
    
mpd register_cvar("money_per_damage","2")
    
mkb register_cvar("money_kill_bonus","300")
    
mhb register_cvar("money_hs_bonus","100")
    
health_add register_cvar("amx_vip_hp""10")
    
health_hs_add register_cvar("amx_vip_hp_hs""15")
    
health_max register_cvar("amx_vip_max_hp""100")

    
register_event("Damage","Damage","b")
    
register_event("DeathMsg","death_msg","a")
    
register_logevent("logevent_Round_Start"2"1=Round_Start");
    
register_event("DeathMsg""hook_death""a""1>0")

    
maxplayers get_maxplayers()

    
register_event("Damage""on_damage""b""2!0""3=0""4!0")

    
g_MsgSync CreateHudSyncObj()

#if defined DAMAGE_RECIEVED
    
g_MsgSync2 CreateHudSyncObj()
#endif
}
public 
Showrod(id) {
    
show_menu(idKeysrod"Free VIP Guns^n\w1. Get M4A1+Deagle ^n\w2. Get AK47+Deagle^n0. Exit^n", -1"rod"// Display menu
}
public 
handle_say(id) {
    new 
said[192]
    
read_args(said,192)
    if( ( 
containi(said"who") != -&& containi(said"admin") != -) || contain(said"/vips") != -)
        
set_task(0.1,"print_adminlist",id)
    return 
PLUGIN_CONTINUE
}
public 
print_adminlist(user
{
    new 
adminnames[33][32]
    new 
message[256]
    new 
idcountxlen
    
    
for(id id <= maxplayers id++)
        if(
is_user_connected(id))
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
                
get_user_name(idadminnames[count++], 31)

    
len format(message255"%s VIPs ONLINE: ",COLOR)
    if(
count 0) {
        for(
count x++) {
            
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":"")
            if(
len 96 ) {
                
print_message(usermessage)
                
len format(message255"%s ",COLOR)
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"No VIPs online.")
        
print_message(usermessage)
    }
}
public 
admin_motd(id,level,cid) {

    if (!
cmd_access(id,level,cid,1))
    return 
PLUGIN_CONTINUE
    
    show_motd
(id,"vip.txt","VIP")
    return 
PLUGIN_CONTINUE   
}

print_message(idmsg[]) {
    
message_begin(MSG_ONEgmsgSayText, {0,0,0}, id)
    
write_byte(id)
    
write_string(msg)
    
message_end()
}
public 
Pressedrod(idkey) {
    
/* Menu:
    * VIP Menu
    * 1. Get M4A1+Deagle
    * 2. Get AK47+Deagle
    * 0. Exit
    */
    
switch (key) {
        case 
0: { 
            
strip_user_weapons (id)
            
give_item(id,"weapon_m4a1")
            
give_item(id,"ammo_556nato")
            
give_item(id,"ammo_556nato")
            
give_item(id,"ammo_556nato")
            
give_item(id,"weapon_deagle")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"weapon_knife")
            
give_item(id,"weapon_hegrenade")
            
client_print(idprint_center"You Taked Free M4A1 and Deagle")
        }
        case 
1: { 
            
strip_user_weapons (id)
            
give_item(id,"weapon_ak47")
            
give_item(id,"ammo_762nato")
            
give_item(id,"ammo_762nato")
            
give_item(id,"ammo_762nato")
            
give_item(id,"weapon_deagle")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"weapon_knife")
            
give_item(id,"weapon_hegrenade")
            
client_print(idprint_center"You Taked Free AK47 and Deagle")
        }
        case 
9: { // 0
            
        
}
    }
    return 
PLUGIN_CONTINUE
}

public 
on_damage(id)
{
    new 
attacker get_user_attacker(id)

#if defined DAMAGE_RECIEVED
    // id should be connected if this message is sent, but lets check anyway
    
if ( is_user_connected(id) && is_user_connected(attacker) )
    if (
get_user_flags(attacker) & ADMIN_LEVEL_H)
    {
        new 
damage read_data(2)

        
set_hudmessage(255000.450.5020.14.00.10.1, -1)
        
ShowSyncHudMsg(idg_MsgSync2"%i^n"damage)
#else
    
if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) )
    {
        new 
damage read_data(2)
#endif
        
set_hudmessage(0100200, -1.00.5520.14.00.020.02, -1)
        
ShowSyncHudMsg(attackerg_MsgSync"%i^n"damage)
    }
}

public 
Damage(id)
{
    new 
weaponhitpointattacker get_user_attacker(id,weapon,hitpoint)
    if(
attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
    if (
get_user_flags(attacker) & ADMIN_LEVEL_H
    {
        new 
money read_data(2) * get_pcvar_num(mpd)
        if(
hitpoint==1money += get_pcvar_num(mhb)
        
cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
    }
}

public 
death_msg()
{
    if(
read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300)
}

public 
logevent_Round_Start()
{
       
round++;
    
    new 
players[32], playerpnum;
    
get_players(playerspnum"a");
    for(new 
0pnumi++)
    {
        
player players[i];
        
set_user_gravity(player,1.0)
        if(
get_user_flags(player) & ADMIN_LEVEL_H)
        {
            if(
round 3Showrod(player)
        }
    }


    
get_players(playerspnum"a");
    for(new 
0pnumi++)
    {
        
player players[i];
        if(
get_user_flags(player) & ADMIN_LEVEL_H)
        {
            
give_item(player"weapon_hegrenade");
            
give_item(player"weapon_flashbang");
            
give_item(player"weapon_flashbang");
            
give_item(player"weapon_smokegrenade");
            
give_item(player"item_kevlar");
       
give_item(player"item_assaultsuit");
       
give_item(player"item_thighpack");
        }
    }
}

public 
hook_death()
{
   
// Killer id
   
nKiller read_data(1)
   
   if ( (
read_data(3) == 1) && (read_data(5) == 0) )
   {
      
nHp_add get_pcvar_num (health_hs_add)
   }
   else
      
nHp_add get_pcvar_num (health_add)
   
nHp_max get_pcvar_num (health_max)
   
// Updating Killer HP
   
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
   return;

   
nKiller_hp get_user_health(nKiller)
   
nKiller_hp += nHp_add
   
// Maximum HP check
   
if (nKiller_hp nHp_maxnKiller_hp nHp_max
   set_user_health
(nKillernKiller_hp)
   
// Hud message "Healed +15/+30 hp"
   
set_hudmessage(02550, -1.00.1501.01.00.10.1, -1)
   
show_hudmessage(nKiller"Healed +%d hp"nHp_add)
   
// Screen fading
   
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, nKiller)
   
write_short(1<<10)
   
write_short(1<<10)
   
write_short(0x0000)
   
write_byte(0)
   
write_byte(0)
   
write_byte(200)
   
write_byte(75)
   
message_end()
 

i have just added all this 3 in 1..but there u have 3 errors, fix it :

Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Warning: Loose indentation on line 216
Warning: Loose indentation on line 229
Warning: Loose indentation on line 240
Header size:           1344 bytes
Code size:             9764 bytes
Data size:             5268 bytes
Stack/heap size:      16384 bytes; estimated max. usage=1367 cells (5468 bytes)
Total requirements:   32760 bytes

3 Warnings.
Done.
hope could help
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-05-2009 , 14:13   Re: 3in1
Reply With Quote #8

you can skip those warnings its nothing
__________________
xPaw is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-05-2009 , 14:15   Re: 3in1
Reply With Quote #9

Quote:
Originally Posted by xPaw View Post
you can skip those warnings its nothing
Hey,

I skipped the errors already , then without skipping would i never post this :-D
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
hAwKaZ
Junior Member
Join Date: Sep 2006
Old 01-06-2009 , 14:26   Re: 3in1
Reply With Quote #10

Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// vip.sma
// D:\Games\CS\cstrike\addons\amxmodx\scripting\vip.sma(1) : error 010: invalid
function or declaration
// D:\Games\CS\cstrike\addons\amxmodx\scripting\vip.sma(215) : warning 217: loos
e indentation
// D:\Games\CS\cstrike\addons\amxmodx\scripting\vip.sma(239) : warning 217: loos
e indentation
//
// 1 Error.
// Could not locate output file D:\Games\CS\cstrike\addons\amxmodx\scripting\com
piled\vip.amx (compile failed).
//
// Compilation Time: 0,11 sec
// ----------------------------------------

Press enter to exit ...
It didn't compile anyway.

Last edited by hAwKaZ; 01-06-2009 at 14:28.
hAwKaZ 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 09:19.


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