
Posts
105
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Community Scripter
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
maps\guns::main();
maps\_zombiemode::main();
maps\guns::main();
maps\_zombiemode::main();
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
main()
{
level.gun_spot = getentArray("free", "targetname");// u can edit the targetname if already using"free" in ye map
level._effect["powerup_on"] = loadfx( "misc/fx_zombie_powerup_on" );// u can edit the fx u want to play on the gun
thread gun_ammo();
/// dont touch these
currentweapon = self GetCurrentWeapon();
ammoclip = WeaponClipSize( currentweapon );
self SetWeaponAmmoClip( currentweapon, ammoclip );
}
gun_ammo()/// dont touch these
{
thread gun();
while(1)
{
level waittill("between_round_over");
level.gunmodel Delete();
gun();
}
}
gun()/// dont touch these
{
rand = RandomIntRange( 0, level.gun_spot.size);
randomgun = random_weapon();
gunmodelname = GetWeaponModel( randomgun );
for(i = 0; i < level.gun_spot.size; i++)
{
if(rand == i)
{
level.gunmodel = spawn( "script_model", level.gun_spot[i].origin +( 0, 0, -4 ) );
level.gunmodel.angles = level.gun_spot[i].angles +( 0, 180, 0 );
level.gunmodel setmodel( "tag_origin" );
playfxontag( level._effect["powerup_on2"], level.gunmodel, "tag_origin" );
level.gunmodel setmodel( gunmodelname );
thread got_ammo( gunmodelname );
}
}
}
got_ammo( gunmodelname )/// dont touch these
{
level endon("between_round_over");
level endon("ammo_taked");
player = get_Players();
while(1)
{
for(i = 0; i < player.size; i++)
{
if(player[i] IsTouching(level.gunmodel) )
{
thread free();
player[i] playsound("powerup_grabbed");
level.gunmodel Delete();
level notify("ammo_taked");
}
}
wait .2;
}
}
random_weapon()/// dont touch these
{
keys = GetArrayKeys( level.zombie_weapons );
return keys[RandomInt( keys.size )];
}
free()
{
level.free_weapon = [];/// u can add any guns in ye map and just replace them with the names of the guns below
level.free_weapon[0] = "zombie_gewehr43";
level.free_weapon[1] = "zombie_mp40";
level.free_weapon[2] = "zombie_stg44";
level.free_weapon[3] = "ptrs41_zombie";
level.free_weapon[4] = "zombie_doublebarrel_sawed_upgraded";
level.free_weapon[5] = "zombie_m1garand";
level.free_weapon[6] = "zombie_thompson";
level.free_weapon[7] = "zombie_fg42";
level.free_weapon[8] = "zombie_kar98k_upgraded";
level.free_weapon[9] = "zombie_sw_357_upgraded"; // rare weapon
level.free_weapon[10] = "zombie_mg42_upgraded"; // rare weapon
player = get_players();
for(i=0;i<player.size;i++)
{
player = player[i];
weapon = player getcurrentweapon();
weap = player GetWeaponsListPrimaries();
rand = randomintrange(1,1000);
for(i=0;i<weap.size;i++)
{
if(weap.size <= 2)
{
continue;
}
if(weap.size >=3)
{
player takeweapon(weapon);
}
}
if(rand == 1) // rare weapon 1
{
player giveweapon(level.free_weapon[9]);
player switchtoweapon(level.free_weapon[9]);
}
if(rand == 1000) //rare weapon 2
{
player giveweapon(level.free_weapon[10]);
player switchtoweapon(level.free_weapon[10]);
}
// normal weapons
if(rand >=3 && rand <=99)
{
player giveweapon(level.free_weapon[8]);
player switchtoweapon(level.free_weapon[8]);
}
if(rand >=900 && rand<=999)
{
player giveweapon(level.free_weapon[7]);
player switchtoweapon(level.free_weapon[7]);
}
if(rand >= 800 && rand <= 899)
{
player giveweapon(level.free_weapon[1]);
player switchtoweapon(level.free_weapon[1]);
}
if(rand >= 500 && rand <= 599) // a little hard
{
player giveweapon(level.free_weapon[6]);
player switchtoweapon(level.free_weapon[6]);
}
if(rand >= 100 && rand <= 199)
{
player giveweapon(level.free_weapon[5]);
player switchtoweapon(level.free_weapon[5]);
}
if(rand >= 300 && rand <= 399)
{
player giveweapon(level.free_weapon[4]);
player switchtoweapon(level.free_weapon[4]);
}
if(rand >=600 && rand <= 699 )
{
player giveweapon(level.free_weapon[3]);
player switchtoweapon(level.free_weapon[3]);
}
if(rand >=400 && rand <= 499)
{
player giveweapon(level.free_weapon[2]);
player switchtoweapon(level.free_weapon[2]);
}
if(rand >= 200 && rand <= 299)
{
player giveweapon(level.free_weapon[0]);
player switchtoweapon(level.free_weapon[0]);
}
}
}
targetname
free
NOTE: you can edit this script to fit your map if u have NO knowlegde of scriptin and need help editing this just leave a post or if u have me on steam and skype u already should know i wont mind helping you coffee1
![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |