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

.....Thanks everyone who helped in here