Raised This Month: $ Target: $400
 0% 

First Script Problem (Very Small)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
TaRgEt*TuRkEy
Member
Join Date: Oct 2004
Old 01-10-2005 , 07:39   First Script Problem (Very Small)
Reply With Quote #1

Basically what I want to do is give random equipment, and a certain ammount of it each round to all the players (maybe different to each player?).

THE PROBLEM NOW - Look at my bottom post for explaination.

Code:
#define AMX_MOD_X #include <amxmodx> #include <cstrike> #include <fun> #define MAX_LINES 64 #define MAX_STRING_LEN 256 new Title[32] = "Random Equip" new Version[32] = "0.0.0" new Author[16] = "TaRgEt*TuRkEy" new ammo_type new ammo_amount public plugin_init() {     register_plugin(Title,Version,Author)     register_logevent("new_round", 2, "1=Round_Start") } public new_round(id) {         new weapon[32]     new User[32]     new RandomNum = random(5) +1     if (RandomNum == 1)     {         ammo_type = 1         ammo_amount = 1         client_print(0,print_chat, "[AMX] <Random Equip> Your have recieved a complimentry P228!", User)     } else if (RandomNum == 2){         ammo_type = 3         ammo_amount = 1         client_print(0,print_chat, "[AMX] <Random Equip> Your have recieved a stunning Scout!", User)     } else if (RandomNum == 3){         ammo_type = 4         ammo_amount = 2         client_print(0,print_chat, "[AMX] <Random Equip> Your have recieved a 2 Hand Grenades!", User)     } else if (RandomNum == 4){         ammo_type = 5         ammo_amount = 1         client_print(0,print_chat, "[AMX] <Random Equip> Your have recieved a noobish XM1014!", User)     } else if (RandomNum == 5){         ammo_type = 7         ammo_amount = 1         client_print(0,print_chat, "[AMX] <Random Equip> Your have recieved an unaccurate Mac10!", User)     }     get_weaponname(ammo_type,weapon,sizeof(weapon))     give_item(id,weapon)     cs_set_user_bpammo(id,ammo_type,ammo_amount)     return PLUGIN_CONTINUE }
TaRgEt*TuRkEy 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 19:16.


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