Raised This Month: $ Target: $400
 0% 

weapon chance


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
duckluck0077
Member
Join Date: Feb 2007
Old 12-09-2007 , 19:55   weapon chance
Reply With Quote #1

how do i set how many bullets the gun should have ?

Quote:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define TIME_TO_WAIT 2.0

public plugin_init()
{
register_logevent("round_start", 2, "1=Round_Start")
}

public main_func()
{
new players[32], num
get_players(players, num)
new player
for(new i = 0; i < num; i++)
{
player = players[i]
new health = get_user_health(player);

if(random_num(0, 100) <= 1)
{
give_item(player, "weapon_awp")

cs_set_user_bpammo(player, CSW_AWP, 0)
client_print(player, print_chat, "Lucky You have got a awp with 1 bullet (1% chance)")
}

if(random_num(0, 100) <= 3)
{
give_item(player, "weapon_deagle")

cs_set_user_bpammo(player, CSW_DEAGLE, 0)
client_print(player, print_chat, "Lucky You have got a deagle with 1 bullet (3% chance)")
}

if(random_num(0, 100) <= 6)
{
give_item(player, "weapon_fiveseven")

cs_set_user_bpammo(player, CSW_FIVESEVEN, 0)
client_print(player, print_chat, "Lucky You have got a fiveseven (with 4 bullet (6% chance)")
}

if(random_num(0, 100) <= 15)
{
give_item(player, "weapon_hegrenade")
client_print(player, print_chat, "Lucky You have got a HE-grenade (15% chance")
}

if(random_num(0, 100) <= 2)
{
health += 100;
set_user_health(player,health);
client_print(player, print_chat, "Lucky You have got 100 extra health, if you walk on a healer you will loose this extra health (2% chance")
}

if(random_num(0, 100) <= 4)
{
health += 50;
set_user_health(player,health);
client_print(player, print_chat, "Lucky You have got 50 extra health, if you walk on a healer you will loose this extra health (4% chance")
}

if(random_num(0, 100) <=
{
health += 25;
set_user_health(player,health);
client_print(player, print_chat, "Lucky You were got 25 extra health, if you walk on a healer you will loose this extra health (8% chance")
}
}
}

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

Last edited by duckluck0077; 12-10-2007 at 16:40.
duckluck0077 is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 12-10-2007 , 07:23   Re: weapon chance
Reply With Quote #2

What are you asking??

Familiar??
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
duckluck0077
Member
Join Date: Feb 2007
Old 12-10-2007 , 07:58   Re: weapon chance
Reply With Quote #3

how many bullest the guns have how do i set that ?
duckluck0077 is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 12-10-2007 , 13:53   Re: weapon chance
Reply With Quote #4

It is answered in the thread I posted
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
duckluck0077
Member
Join Date: Feb 2007
Old 12-10-2007 , 15:42   Re: weapon chance
Reply With Quote #5

what did you poste ?
duckluck0077 is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 12-10-2007 , 16:04   Re: weapon chance
Reply With Quote #6

Why don't you read?
__________________
M249-M4A1 is offline
duckluck0077
Member
Join Date: Feb 2007
Old 12-10-2007 , 16:11   Re: weapon chance
Reply With Quote #7

its dosent work
can someone take my code and do so awp got 1 bullet dgl 2 and fiveseven 4 and do so the procent here comes in the game (10% chance)

Last edited by duckluck0077; 12-10-2007 at 16:35.
duckluck0077 is offline
duckluck0077
Member
Join Date: Feb 2007
Old 12-10-2007 , 16:35   Re: weapon chance
Reply With Quote #8

cuz that he maked dosent work
duckluck0077 is offline
bmclover
Junior Member
Join Date: Jul 2007
Old 12-16-2007 , 16:05   Re: weapon chance
Reply With Quote #9

Can someone compile this .sma file to a .amxx file plz http://www.speedyshare.com/163655733.html
bmclover is offline
Old 12-16-2007, 16:32
_Master_
This message has been deleted by _Master_. Reason: Some ppl just don't read the damn rules...
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 12-16-2007 , 17:26   Re: weapon chance
Reply With Quote #10

Come on man...Read around.
http://www.amxmodx.org/webcompiler.cgi
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
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:13.


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