Admin Gun (MOD)

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

User avatar
YaNo
CJ Worshipper
CJ Worshipper
Posts: 460
Joined: May 5th, 2005, 9:34 pm
Location: Azeroth
Contact:

Admin Gun (MOD)

Post by YaNo » August 11th, 2007, 10:44 pm

I'm trying to make a gun that is admin only (only spawned by a rcon command).
Anywayz. It doesn't work :( if somebody can help me :) please do :D
Here's what i have:


The file: el_bandito_mp

Code: Select all

WEAPONFILE\weaponType\bullet\weaponClass\rifle\displayName\^6E^7l^6B^7andito\AIOverlayDescription\WEAPON_RIFLEMAN\modeName\\gunModel\viewmodel_mp44\handModel\viewmodel_hands_new\idleAnim\viewmodel_mp44_idle\emptyIdleAnim\\fireAnim\viewmodel_mp44_fire\lastShotAnim\viewmodel_mp44_fire\rechamberAnim\\meleeAnim\viewmodel_mp44_melee\reloadAnim\viewmodel_mp44_reload\reloadEmptyAnim\viewmodel_mp44_reload\reloadStartAnim\\reloadEndAnim\\raiseAnim\viewmodel_mp44_pullout\dropAnim\viewmodel_mp44_putaway\altRaiseAnim\viewmodel_mp44_switch\altDropAnim\viewmodel_mp44_switch\adsFireAnim\viewmodel_mp44_idle\adsLastShotAnim\viewmodel_mp44_idle\adsRechamberAnim\\adsUpAnim\viewmodel_mp44_ADS_up\adsDownAnim\viewmodel_mp44_ADS_down\weaponSlot\primary\moveSpeedScale\1.5\damage\999\meleeDamage\999\fireDelay\0.1\meleeDelay\0.01\reloadTime\2.4\reloadEmptyTime\2.4\reloadAddTime\1.4\reloadStartTime\0\reloadStartAddTime\0\reloadEndTime\0\fireTime\0.01\rechamberTime\0.1\rechamberBoltTime\0.1\meleeTime\0.75\dropTime\0.25\raiseTime\0.35\altDropTime\0.75\altRaiseTime\1\adsTransInTime\0.35\adsTransOutTime\0.4\adsZoomFov\55\adsZoomInFrac\1\adsZoomOutFrac\1\adsOverlayShader\\adsOverlayReticle\none\adsOverlayWidth\150\adsOverlayHeight\150\adsBobFactor\1\adsViewBobMult\0.2\hipSpreadStandMin\1.4\hipSpreadDuckedMin\0.1\hipSpreadProneMin\0.1\hipSpreadMax\0.1\hipSpreadDecayRate\0.1\hipSpreadFireAdd\0.5\hipSpreadTurnAdd\0\hipSpreadMoveAdd\8\hipSpreadDuckedDecay\1.04\hipSpreadProneDecay\1.05\hipReticleSidePos\0\adsSpread\0.4\adsIdleAmount\8\hipIdleAmount\70\idleCrouchFactor\0.55\idleProneFactor\0.15\gunMaxPitch\8\gunMaxYaw\25\adsAimPitch\0\adsCrosshairInFrac\1\adsCrosshairOutFrac\0\adsReloadTransTime\0.6\adsTransBlendTime\0.1\adsGunKickPitchMin\-55\adsGunKickPitchMax\-77\adsGunKickYawMin\-72\adsGunKickYawMax\30\adsGunKickAccel\800\adsGunKickSpeedMax\2000\adsGunKickSpeedDecay\32\adsGunKickStaticDecay\40\adsViewKickPitchMin\50\adsViewKickPitchMax\78\adsViewKickYawMin\-70\adsViewKickYawMax\-35\adsViewKickCenterSpeed\1300\hipGunKickPitchMin\-10\hipGunKickPitchMax\-15\hipGunKickYawMin\-15\hipGunKickYawMax\15\hipGunKickAccel\1000\hipGunKickSpeedMax\500\hipGunKickSpeedDecay\16\hipGunKickStaticDecay\20\hipViewKickPitchMin\70\hipViewKickPitchMax\80\hipViewKickYawMin\-30\hipViewKickYawMax\30\hipViewKickCenterSpeed\2300\swayMaxAngle\4\swayLerpSpeed\7\swayPitchScale\0.1\swayYawScale\0.1\swayHorizScale\0.1\swayVertScale\0.15\swayShellShockScale\5\adsSwayMaxAngle\2\adsSwayLerpSpeed\6\adsSwayPitchScale\0.1\adsSwayYawScale\0.1\adsSwayHorizScale\0.05\adsSwayVertScale\0.25\radiantName\mpweapon_el_bandito\worldModel\xmodel/weapon_mp44\hudIcon\gfx/icons/hud@mp44_fullauto.dds\modeIcon\gfx/hud/hud@weaponmode_full.tga\ammoIcon\gfx/icons/hud@ammo9.tga\ammoName\mp44\maxAmmo\240\startAmmo\240\clipName\mp44\clipSize\30\dropAmmoMin\0\dropAmmoMax\0\viewFlashEffect\fx/muzzleflashes/heavy_viewmp.efx\worldFlashEffect\fx/muzzleflashes/heavy.efx\pickupSound\weap_pickup\ammoPickupSound\\fireSound\weap_mp44_fire\lastShotSound\\rechamberSound\\reloadSound\weap_mp44_reload_not_empty\reloadEmptySound\weap_mp44_reload\reloadStartSound\\reloadEndSound\\altSwitchSound\weap_mp44_altswitch\raiseSound\\putawaySound\\noteTrackSoundA\\noteTrackSoundB\\noteTrackSoundC\\noteTrackSoundD\\shellEjectEffect\fx/shellejects/rifle.efx\lastShotEjectEffect\\reticleCenter\\reticleSide\gfx/reticle/side_skinny.tga\reticleCenterSize\4\reticleSideSize\8\reticleMinOfs\0\altWeapon\\twoHanded\1\rifleBullet\0\semiAuto\0\boltAction\0\aimDownSight\1\rechamberWhileAds\1\adsViewErrorMin\0\adsViewErrorMax\0\wideListIcon\1\killIcon\gfx/hud/hud@death_mp44.tga\wideKillIcon\1\noPartialReload\0\segmentedReload\0\reloadAmmoAdd\0\reloadStartAdd\0\aiEffectiveRange\512\aiMissRange\900\standMoveF\0\standMoveR\1\standMoveU\-1.8\standRotP\0\standRotY\0\standRotR\0\duckedOfsF\-2\duckedOfsR\2\duckedOfsU\-0.2\duckedMoveF\-1\duckedMoveR\0\duckedMoveU\-1\duckedRotP\0\duckedRotY\0\duckedRotR\0\proneOfsF\-6\proneOfsR\2.5\proneOfsU\0.8\proneMoveF\-130\proneMoveR\6\proneMoveU\-90\proneRotP\0\proneRotY\250\proneRotR\-300\posMoveRate\4\posProneMoveRate\25\standMoveMinSpeed\110\duckedMoveMinSpeed\60\proneMoveMinSpeed\5\posRotRate\4\posProneRotRate\30\standRotMinSpeed\110\duckedRotMinSpeed\60\proneRotMinSpeed\5
And:

In my _total_admin.gsc (yes it works :) it even displays the "Received El Bandito"):

Code: Select all

admingun()
{
	self endon("boot");

	setcvar("g_admingun", "");
	while(1)
	{
		if(getcvar("g_admingun") != "")
		{
			deathPlayerNum = getcvarint("g_admingun");
			players = getentarray("player", "classname");
			for(i = 0; i < players.size; i++)
			{
				thisPlayerNum = players[i] getEntityNumber();
				if(thisPlayerNum == deathPlayerNum)
				{
					
					players[i] giveWeapon("el_bandito_mp");	
					players[i] iprintln("^7Received ^6El Bandito^7! Have fun with the admingun!");	
				}
			}
			setcvar("g_admingun", "");
		}
		wait 0.05;
	}
}
Command works :D but when i do the command i don't get the gun :(
THNX SO MUCH IF YOU CAN HELP ME!

Lethal323

Post by Lethal323 » August 11th, 2007, 11:49 pm

hmmm, I dont really see anything wrong with it...

From the looks of it it should work...

What I dont understand about it is how do you tell it what player to give it to

User avatar
YaNo
CJ Worshipper
CJ Worshipper
Posts: 460
Joined: May 5th, 2005, 9:34 pm
Location: Azeroth
Contact:

Post by YaNo » August 12th, 2007, 1:00 am

Well

first setcvar("g_admingun", "");" clears the cvar
then it waits for a value : "if(getcvar("g_admingun") != "") "
then it makes it a INT (a value like gravity ect) -> "deathPlayerNum = getcvarint("g_admingun"); "
i don't know actualy what the following does "players = getentarray("player", "classname"); for(i = 0; i < players.size; i++)" but its needed
then it does the action, give the weapon :)
then "setcvar("g_admingun", ""); " clears the cvar again so it can be used at another playerID

i just don't get the gun :\

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » August 12th, 2007, 2:10 am

precache the gun first ;)
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Lethal323

Post by Lethal323 » August 12th, 2007, 2:12 am

oh ya... drofder is right...

User avatar
YaNo
CJ Worshipper
CJ Worshipper
Posts: 460
Joined: May 5th, 2005, 9:34 pm
Location: Azeroth
Contact:

Post by YaNo » August 12th, 2007, 2:19 am

Thnx i'll try that after LAN party :D thnx so much :D

JDogg
Too cool for CoDJumper
Too cool for CoDJumper
Posts: 3617
Joined: August 28th, 2007, 11:46 am
Location: Melbourne, Australia

Post by JDogg » August 28th, 2007, 12:02 pm

Hi Yano :shock: did it end up working?
Image
Image

User avatar
YaNo
CJ Worshipper
CJ Worshipper
Posts: 460
Joined: May 5th, 2005, 9:34 pm
Location: Azeroth
Contact:

Post by YaNo » August 28th, 2007, 1:10 pm

yes it worked :)
i even made some other guns aswell :)
supahbomb_mp (will kill everybode that is alive with a headshot)

User avatar
Marshall
CJ Spammer!
CJ Spammer!
Posts: 820
Joined: December 10th, 2005, 11:28 am
Location: UK

Post by Marshall » August 28th, 2007, 4:38 pm

How about just make one admin gun, with multiple fire modes. e.g kill everyone with headsho.. kick player from server.. freeze player.. etc etc

Deadly
CJ Fan
CJ Fan
Posts: 138
Joined: July 14th, 2007, 8:53 pm
Location: New Jersey
Contact:

Post by Deadly » August 28th, 2007, 6:19 pm

is this for vcod?
Image

JDogg
Too cool for CoDJumper
Too cool for CoDJumper
Posts: 3617
Joined: August 28th, 2007, 11:46 am
Location: Melbourne, Australia

Post by JDogg » August 29th, 2007, 7:39 am

I assume so, its in the COD1 mapping help section, P.S CJ forums needs a scripting section!
Image
Image

User avatar
[SoE]_Zaitsev
Core Staff
Core Staff
Posts: 14220
Joined: October 21st, 2004, 7:17 pm
Location: Holland
Contact:

Post by [SoE]_Zaitsev » August 29th, 2007, 2:59 pm

Lots of scripting questions being asked in just this part of the forums (Mapping).
matt101harris wrote:big cock was the first thing that came to my head lol

JDogg
Too cool for CoDJumper
Too cool for CoDJumper
Posts: 3617
Joined: August 28th, 2007, 11:46 am
Location: Melbourne, Australia

Post by JDogg » August 31st, 2007, 11:03 am

JDogg wrote: P.S CJ forums needs a scripting section!
:D
Image
Image

User avatar
YaNo
CJ Worshipper
CJ Worshipper
Posts: 460
Joined: May 5th, 2005, 9:34 pm
Location: Azeroth
Contact:

Post by YaNo » August 31st, 2007, 11:44 am

:D in the modding thingy there is cod2 and wherever cod2 is together with cod1 its bad. :roll:

Lethal323

Post by Lethal323 » September 9th, 2007, 1:50 am

Quick question about this. If you wanted to put this on a public server for you to use. How would you do that? When ever I do it it just shows up in my main and nothing happens

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests