Originally Posted by
Arasonic
The AIZombies one is too complicated for me (:
The nemesis mod.. hmm its alot of shit in it so might worth a try
EDIT: Alright, that was TOO much shit. lol, seriously, looking for it through all that would take like a day.
It is easy to find code in nemesis (CTRL+F) and The ammo box in AIZombies is inside the _airdrop.gsc
Originally Posted by
kerocx
Use the code from Nemesis.
The weapon code in nemesis is good but it is too complicated
I know why it cause lag...
May be u need to precache all model
And for Ansonic,
I edited combine your weapon and box into one
(this will include in my new mapedit mod)
Code:
CreateWbox(WFunc,Weapon,WeaponName,Location,TakeOnce)
{
self endon("disconnect");
weapon_model = getWeaponModel(Weapon);
if(weapon_model=="")weapon_model = Weapon;
box = spawn("script_model", Location);
box setModel("com_plasticcase_friendly");
box Solid();
box CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
Wep = spawn("script_model",Location+(0,0,30));
Wep setModel(weapon_model);
for(;;)
{
foreach(player in level.players)
{
Radius=distance(Location,player.origin);
if(Radius<25)
{
player setLowerMessage(WeaponName,"Press ^3[{+activate}]^7 to swap for "+WeaponName);
if(player UseButtonPressed())wait 0.1;
if(player UseButtonPressed())
{
if(!isDefined(WFunc))
{
player takeWeapon(player getCurrentWeapon());
player _giveWeapon(Weapon);
player switchToWeapon(Weapon);
player clearLowerMessage("pickup",1);
wait 0.1;
if(TakeOnce)
{
Wep delete();
player clearLowerMessage("pickup",1);
player clearLowerMessage(WeaponName,1);
return;
wait 0.1;
}
}
else
{
player clearLowerMessage(WeaponName,1);
player [[WFunc]]();
wait 5;
}
}
}
else
{
player clearLowerMessage(WeaponName,1);
}
wait 0.1;
}
wait 0.5;
}
}