Raised This Month: $ Target: $400
 0% 

Let everyone know


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jageassyrian
Senior Member
Join Date: Jul 2007
Old 01-04-2008 , 23:36   Let everyone know
Reply With Quote #1

Is there anyway so u can make it once somebody gets an awp in this chance mod i have provided it will announce to everybody
PHP Code:
public main_func()
{
new 
players[32], num
get_players
(playersnum)

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

if(
random_num(1200) <= 2)
{
give_item(player,"weapon_awp");
new 
weapon_id find_ent_by_owner(-1"weapon_awp"player);
cs_set_weapon_ammo(weapon_id2);
client_print(playerprint_chat"You were lucky, you got a awp with 2 bullets")
}

if(
random_num(11000) <= 1)
{
give_item(player,"weapon_m3");
new 
weapon_id find_ent_by_owner(-1"weapon_m3"player);
cs_set_weapon_ammo(weapon_id4);
client_print(playerprint_chat"You were very lucky, you got a M3 with 4 bullets")
}

if(
random_num(1100) <= 2)
{
give_item(player,"weapon_mac10");
new 
weapon_id find_ent_by_owner(-1"weapon_mac10"player);
cs_set_weapon_ammo(weapon_id5);
client_print(playerprint_chat"You were lucky, you got a MAC10 with 5 bullets")
}

if(
random_num(1100) <= 6)
{
give_item(player,"weapon_fiveseven");
new 
weapon_id find_ent_by_owner(-1"weapon_fiveseven"player);
cs_set_weapon_ammo(weapon_id2);
client_print(playerprint_chat"You were lucky, you got a five seven with 2 bullets")
}

if(
random_num(1100) <= 2)
{
give_item(player,"weapon_tmp");
new 
weapon_id find_ent_by_owner(-1"weapon_tmp"player);
cs_set_weapon_ammo(weapon_id5);
client_print(playerprint_chat"You were lucky, you got a Tmp with 5 bullets")
}

if(
random_num(1150) <= 2)
{
give_item(player,"weapon_scout");
new 
weapon_id find_ent_by_owner(-1"weapon_scout"player);
cs_set_weapon_ammo(weapon_id0);
client_print(playerprint_chat"You very were lucky, you got a scout(you run faster)")
}

if(
random_num(1100) <= 2)
{
give_item(player,"weapon_ak47");
new 
weapon_id find_ent_by_owner(-1"weapon_ak47"player);
cs_set_weapon_ammo(weapon_id5);
client_print(playerprint_chat"You were lucky, you got a AK47 with 5 bullets")
}

if(
random_num(1100) <= 4)
{
give_item(player,"weapon_deagle");
new 
weapon_id find_ent_by_owner(-1"weapon_deagle"player);
cs_set_weapon_ammo(weapon_id2);
client_print(playerprint_chat"You were lucky, you got a deagle with 2 bullets")
}

if(
random_num(1100) <= 15)
{
give_item(player"weapon_hegrenade")
client_print(playerprint_chat"You were lucky, you got a hegrenade")
}

if(
random_num(11000) <= 1)
{
give_item(player"weapon_shield")
client_print(playerprint_chat"You were very lucky, you got a Shield")
}



}
}

public 
round_start()
{
set_task(TIME_TO_WAIT"main_func")

jageassyrian is offline
lolhax44
BANNED
Join Date: Jan 2008
Old 01-05-2008 , 05:47   Re: Let everyone know
Reply With Quote #2

PHP Code:
{
give_item(player,"weapon_awp");
new 
weapon_id find_ent_by_owner(-1"weapon_awp"player);
cs_set_weapon_ammo(weapon_id2);
client_print(playerprint_chat"You were lucky, you got a awp with 2 bullets")

To
PHP Code:
{
give_item(player,"weapon_awp");
new 
weapon_id find_ent_by_owner(-1"weapon_awp"player);
cs_set_weapon_ammo(weapon_id2);
client_print(playerprint_chat"You were lucky, you got a awp with 2 bullets")
server_print(playerprint_chat"%s got a awp with 2 bullets")

lolhax44 is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-05-2008 , 06:17   Re: Let everyone know
Reply With Quote #3

Code:
client_print(player, print_chat, "%s got a awp with 2 bullets")
->
Code:
new Name[32];
get_user_name(player, Name, sizeof Name - 1);
Code:
client_print(0, print_chat, "%s got a awp with 2 bullets", Name)
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 01-05-2008 at 09:14.
Alka is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 01-05-2008 , 07:17   Re: Let everyone know
Reply With Quote #4

You should add the player name in there...
_Master_ is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-05-2008 , 09:14   Re: Let everyone know
Reply With Quote #5

Yeah, lol. Updated 0o
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
jageassyrian
Senior Member
Join Date: Jul 2007
Old 01-05-2008 , 12:58   Re: Let everyone know
Reply With Quote #6

SO it should look like this?

if(random_num(1, 200) <= 2)
{
give_item(player,"weapon_awp");
new
weapon_id = find_ent_by_owner(-1, "weapon_awp", player);
cs_set_weapon_ammo(weapon_id, 2);
client_print(0, print_chat, "%s got a awp with 2 bullets", Name) }
jageassyrian is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-05-2008 , 13:26   Re: Let everyone know
Reply With Quote #7

Yeah, and put this part before give_item thing...
Code:
new Name[32];
get_user_name(player, Name, sizeof Name - 1);
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
jageassyrian
Senior Member
Join Date: Jul 2007
Old 01-05-2008 , 14:30   Re: Let everyone know
Reply With Quote #8

if(random_num(1, 200) <= 2)
{
new Name[32];
get_user_name(player, Name, sizeof Name - 1);
give_item(player,"weapon_awp");
new
weapon_id = find_ent_by_owner(-1, "weapon_awp", player);
cs_set_weapon_ammo(weapon_id, 2);
client_print(0, print_chat, "%s got a awp with 2 bullets", Name) }
vbrep_register("570492")
jageassyrian is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-05-2008 , 16:16   Re: Let everyone know
Reply With Quote #9

Yes.
__________________
Still...lovin' . Connor noob! Hello
Alka 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 11:07.


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