 |
|
Veteran Member
Join Date: Apr 2005
Location: Florida
|

03-19-2006
, 22:06
|
#9
|
Quote:
|
Originally Posted by organizedKaoS
Quote:
|
Originally Posted by VEN
Better put to the global array exact weapon names.
Then your func would be:
Code:
public func(id) {
new i = random(MAX_WEAPONS)
give_item(id , g_szWeaps[i])
ammo_up(id)
client_print( id, print_chat, "[WPN] Gave : %s", g_szWeaps[i][7] )
}
|
That didnt seem to work for me...but this
Code:
public func(id) {
new j = random_num( 0, MAX_WEAPONS - 1 )
for( new i = 0; i < MAX_WEAPONS; i++ ) {
if ( i == j ) {
new weap[25]
format(weap , 24 , "weapon_%s" , g_szWeaps[i])
give_item(id , weap)
ammo_up(id)
client_print( id, print_chat, "[WPN] Gave : %s", g_szWeaps[i] )
}
did and yeah :lol: .....Thanks everyone who helped in here :lol: :lol: :lol:
|
Just use VEN's but change it to
Code:
public func(id) {
new i = random(MAX_WEAPONS)
new weap[25]
format(weap , 24 , "weapon_%s" , g_szWeaps[i])
give_item(id , g_szWeaps[i])
ammo_up(id)
client_print( id, print_chat, "[WPN] Gave : %s", g_szWeaps[i])
}
|
|
|
|