Raised This Month: $ Target: $400
 0% 

Error in compling


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
platzpatrone
Veteran Member
Join Date: Apr 2007
Location: Germany
Old 11-24-2009 , 03:47   Re: Error in compling
Reply With Quote #1

well, compile yet.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
static const COLOR[] = "^x03"
static const CONTACT[] = "Your skype!!"
new maxplayers
new gmsgSayText

public plugin_init()
{
    
register_plugin("HNS Vipas""1.0""by Armasi , Edited by Cola")

    
register_logevent("Round_Start"2"1=Round_Start")
    
register_menucmd(register_menuid("menu_rod"), 1023"Pressedrod")
    
register_clcmd("say /noriuvip","ShowMotd")
    
maxplayers get_maxplayers()
    
gmsgSayText get_user_msgid("SayText")
    
register_clcmd("say""handle_say")
    
register_cvar("amx_contactinfo"CONTACTFCVAR_SERVER)

}

public 
Round_Start()
    
set_task(11.0"Uzdelstas_meniu")
    
public 
Uzdelstas_meniu()
{
    new 
players[32], pnum
    get_players
(playerspnum"a")

    for (new 
0pnumi++)
    {
        new 
player players[i]

        if (
get_user_flags(player) & ADMIN_LEVEL_H)
        {
            
ShowmenuID(player)
        }
    }

    return 
PLUGIN_HANDLED
}

public 
ShowmenuID(id)
{
    new 
Body[512]
    new 
CsTeams:iTeam cs_get_user_team(id)

    if (
iTeam == CS_TEAM_T)
    {
        
add(Body511"\rVIP menu: \R\dB e g l i a m s^n^n")
        
add(Body511"\r1. \w+20HP^n")
        
add(Body511"\r2. \w+10HP/10sec^n")
        
add(Body511"\r3. \w250AP^n")
        
add(Body511"\r0. \wIseiti^n")
    }

    else if (
iTeam == CS_TEAM_CT)
    {
        
add(Body511"\rVIP menu: \R\dS e k l i a m s^n^n")
        
add(Body511"\r1. \w+20HP^n")
        
add(Body511"\r2. \wHE granata^n")
        
add(Body511"\r3. \w250AP^n")
        
add(Body511"\r4. \w+10HP/10sec^n")
        
add(Body511"\r0. \wIseiti^n")
    }

    new 
g_Keys = (1<<0|1<<1|1<<2|1<<3|1<<9)
    
show_menu(idg_KeysBody, -1"menu_rod")

    return 
PLUGIN_CONTINUE
}

public 
Pressedrod(idkey)
{
    new 
CsTeams:iTeam cs_get_user_team(id)

    switch(
key)
    {
        case 
0:
        {
            if (
iTeam == CS_TEAM_T)
            {
                
set_user_health(id120);
                
client_print(idprint_chat"VIP > Tau prideta +20HP, dabar HP tu turi 120!")
            }

            else if (
iTeam == CS_TEAM_CT)
            {
                
set_user_health(id120);
                
client_print(idprint_chat"VIP > Tau prideta +20HP, dabar HP tu turi 120!")
            }
        }
        
        case 
1:
        {
            if (
iTeam == CS_TEAM_T)
            {

            if(
is_user_alive(id))
            {
                new 
hp get_user_health(id);
                
                if(
hp 150)
                {
                    
set_task(15.0,"gyvybes"id);
                }
                
client_print(idprint_chat"VIP > Dabar tu, kas 10sec gausi po +10HP!")
            }

            else if (
iTeam == CS_TEAM_CT)
            {
                
give_item(id"weapon_hegrenade");
                
give_item(id"weapon_flashbang");
                
give_item(id"weapon_flashbang");
                
client_print(idprint_chat"VIP > Tu gavai HE ir 2FB granatas!")
            }
            }

        }
        case 
2:
        {
            if (
iTeam == CS_TEAM_T)
            {
                
set_user_armorid250);
                
client_print(idprint_chat"VIP > Dabar tu turi 250AP!")
            }

            else if (
iTeam == CS_TEAM_CT)
            {
                
set_user_armorid250);
                
client_print(idprint_chat"VIP > Dabar tu turi 250AP!")
            }
        }
        case 
3:
        {
            if (
iTeam == CS_TEAM_T)
            {
                
set_user_health(id100);
            }    
            else if (
iTeam == CS_TEAM_CT)
            {
                if(
is_user_alive(id))
                {
                    new 
hp get_user_health(id);
                
                    if(
hp 150)
                    {
                        
set_task(15.0,"gyvybes"id);
                    }
                    
client_print(idprint_chat"VIP > Dabar tu, kas 15sec gausi po +10HP!")
                }
            }
        }
        case 
9
        { 
//Pabaiga
        
}
    }
    return 
PLUGIN_CONTINUE

}

public 
gyvybes(id) {
    
    new 
hp get_user_health(id);
    
    if(
hp 150)
    {
        
set_user_health(idhp 10);
        
set_task(10.0,"gyvybes"id);
    }
    else
    {
        
client_print(idprint_chat"VIP > Daugiau gyvybiu nebegausi, nes pasiekei maximale riba."hp)
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_HANDLED;
}

public 
ShowMotd(id)
{
show_motd(id"vip.txt")
}
public 
client_authorized(id)
{
set_task(30.0"PrintText" ,id)
}
public 
PrintText(id)
{
client_print(idprint_chat"[Hide'N'Seek] Rasyk /noriuvip ir pamatysi visas VIP'u privilegijas.")
}

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 
contactinfo[256], contact[112]
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 Prisijunge VIP'ai: ",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"Visi VIP'ai atsijunge.")
print_message(usermessage)
}

get_cvar_string("amx_contactinfo"contact63)
if(
contact[0]) {
format(contactinfo111"%s Pgr.Administratoriaus skype: %s"COLORcontact)
print_message(usercontactinfo)
}
}

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

as YamiKaitou told u to fix your indentations and coding styles, u dont follow him ^^

Last edited by platzpatrone; 11-24-2009 at 03:53.
platzpatrone is offline
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 13:42.


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