Hi I am looking for a script that would replicate the weapon disposal machine from carrier.
All I need it to do is you walk up to the trigger and you get a indicator to trade your weapon, or some sort of text, and you hold use and you get your current weapon that you have out taken and you're given a certain amount of points.
Hi I am looking for a script that would replicate the weapon disposal machine from carrier.
All I need it to do is you walk up to the trigger and you get a indicator to trade your weapon, or some sort of text, and you hold use and you get your current weapon that you have out taken and you're given a certain amount of points.
If I am understanding you correctly, that should be a really simple script. Try something like:
Code Snippet
Plaintext
Dispose(){ //thread Dispose(); trig = getentarray("dispose","targetname"); for(i=0;i<trig.size;i++){ trig[i] thread DisposeMe(); } } DisposeMe(){ self SetHintString("Press &&1 to dispose of weapon"); self SetCursorHint("HINT_NOICON"); while(1){ self waittill("trigger",player); sell_weapon = player GetCurrentWeapon(); if(IsDefined( player.revivetrigger ) || WeaponClass( sell_weapon ) == "grenade" || IsSubStr(sell_weapon,"bottle")) continue; weapons = player GetWeaponsListPrimaries(); if(weapons.size>1){ points = maps\_zombiemode_weapons::get_weapon_cost( sell_weapon ); if(!isdefined(points)) points = 500; player TakeWeapon(sell_weapon); player SwitchToWeapon(player GetWeaponsListPrimaries()[0]); player maps\_zombiemode_score::add_to_player_score( points ); }else{ player iprintlnbold("You can not dispose of your last weapon"); } wait(.1); } }
Last Edit: July 06, 2015, 12:34:21 pm by MakeCents