Horus | Date: Sunday, 24-10-2021, 3:23 PM | Message # 1 |
Generalissimo
Group: Administrators
Messages: 14
Status: Offline
| I'm in your HLDM, randomizing your equipment! Turkey Equip
Gives players a 357 instead of a pistol, then gives them a random weapon or item. You may turn off the 357 spawn whilst keeping the randomized weapons/items by using the supplied cvar. This is kind of a weird plugin because it essentially has two different functions, or ideas, but that's why I call it "TuRkEy Equip" because it's kind of a personal thing.
CVARS amx_357spawning (0 or 1) When on (1) this will give the 357 magnum to spawning players rather than the standard handgun.
Code /*********************************************************** TuRkEy Equip Author: TaRgEt*TuRkEy - Vaughn Royko Version: 1.0.1 Mod: Half-Life Deathmatch (Valve) Requires: AMX Mod X v1.0 Description: Gives players a 357 instead of a pistol, then gives them a random weapon or item. You may turn off the 357 spawn whilst keeping the randomized items by using the supplied cvars. Cvars: amx_357spawning <0 or 1> ***********************************************************/
#include #include #include #include
new Title[32] = "TuRkEy Equip" new Version[32] = "1.0.1" new Author[16] = "TaRgEt*TuRkEy" new RandomNum = 0
public player_spawn(id) { set_task(0.1,"give_weps",id) register_cvar("amx_357spawning","1") return PLUGIN_HANDLED }
public give_weps(id) { new User[32]
if(get_cvar_num("amx_357spawning")) { strip_user_weapons(id) give_item(id,"weapon_crowbar") give_item(id,"weapon_python") give_item(id,"ammo_357") give_item(id,"ammo_357") give_item(id,"ammo_357") } RandomNum = random(14) +1 switch (RandomNum) { case 1: { give_item(id,"item_battery") give_item(id,"item_battery") client_print(id,print_chat, "You have been given two Battery Packs!", User) } case 2: { give_item(id,"item_longjump") client_print(id,print_chat, "You have been given the Longjump Pack!", User) } case 3: { give_item(id,"weapon_9mmAR") client_print(id,print_chat, "You have been given the MP5!", User) } case 4: { give_item(id,"weapon_9mmhandgun") client_print(id,print_chat, "You have been given the Glock!", User) } case 5: { give_item(id,"weapon_crossbow") client_print(id,print_chat, "You have been given the Crossbow!", User) } case 6: { give_item(id,"weapon_egon") client_print(id,print_chat, "You have been given the Gluon Gun!", User) } case 7: { give_item(id,"weapon_shotgun") client_print(id,print_chat, "You have been given the Shotgun!", User) } case 8: { give_item(id,"weapon_gauss") client_print(id,print_chat, "You have been given the Tau Cannon!", User) } case 9: { give_item(id,"weapon_handgrenade") client_print(id,print_chat, "You have been given some Hand Grenades!", User) } case 10: { give_item(id,"weapon_hornetgun") client_print(id,print_chat, "You have been given the Hivehand!", User) } case 11: { give_item(id,"weapon_rpg") client_print(id,print_chat, "You have been given the RPG!", User) } case 12: { give_item(id,"weapon_satchel") give_item(id,"weapon_satchel") client_print(id,print_chat, "You have been given some Satchel Charges!", User) } case 13: { give_item(id,"weapon_snark") client_print(id,print_chat, "You have been given some Snarks!", User) } case 14: { give_item(id,"weapon_tripmine") give_item(id,"weapon_tripmine") give_item(id,"weapon_tripmine") client_print(id,print_chat, "You have been given some Tripmines!", User) } } return PLUGIN_HANDLED }
public plugin_init() { register_plugin(Title,Version,Author) register_event("ResetHUD","player_spawn","b"); return PLUGIN_HANDLED }
|
|
| |