Raised This Month: $ Target: $400
 0% 

Error in compling


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Cola717
New Member
Join Date: Nov 2009
Old 11-23-2009 , 07:38   Error in compling
Reply With Quote #1

Where is error??? :
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", CONTACT, FCVAR_SERVER)

}

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

	for (new i = 0; i < pnum; i++)
	{
		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(Body, 511, "\rVIP menu: \R\dB e g l i a m s^n^n")
		add(Body, 511, "\r1. \w+20HP^n")
		add(Body, 511, "\r2. \w+10HP/10sec^n")
		add(Body, 511, "\r3. \w250AP^n")
		add(Body, 511, "\r0. \wIseiti^n")
	}

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

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

	return PLUGIN_CONTINUE
}

public Pressedrod(id, key)
{
	new CsTeams:iTeam = cs_get_user_team(id)

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

			else if (iTeam == CS_TEAM_CT)
			{
				set_user_health(id, 120);
				client_print(id, print_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(id, print_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(id, print_chat, "VIP > Tu gavai HE ir 2FB granatas!")
                        {
			}
			}
		}
		case 2:
		{
			if (iTeam == CS_TEAM_T)
			{
				set_user_armor( id, 250);
				client_print(id, print_chat, "VIP > Dabar tu turi 250AP!")
			}

			else if (iTeam == CS_TEAM_CT)
			{
				set_user_armor( id, 250);
				client_print(id, print_chat, "VIP > Dabar tu turi 250AP!")
			}
		}
		case 3:
		{
			if (iTeam == CS_TEAM_T)
			{
				set_user_health(id, 100);
			}	
			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(id, print_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(id, hp + 10);
		set_task(10.0,"gyvybes", id);
	}
	else
	{
		client_print(id, print_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(id, print_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") != -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 contactinfo[256], contact[112]
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 Prisijunge VIP'ai: ",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, "Visi VIP'ai atsijunge.")
print_message(user, message)
}

get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Pgr.Administratoriaus skype: %s", COLOR, contact)
print_message(user, contactinfo)
}
}

print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
P.S. There are some lithuania some english Language
Cola717 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 13:42.


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