Posts: 1,830
Threads: 104
Joined: Jan 2011
Reputation:
46
Is it normal that the weapon models have every attachment when you see them on the map?
also i'm not getting the 'press f to pick up blabla' stuff when i'm close to the gun
i'm only using the Createweapon, Weaponthink and weaponrespawnthink functions... do i need to put in the others when i dont use them?
Posts: 107
Threads: 6
Joined: Nov 2010
Reputation:
13
(02-25-2011, 17:43)iAegle Wrote: also i'm not getting the 'press f to pick up blabla' stuff when i'm close to the gun
Code: StworzHint()
{
self.HintText = self createFontString("default", 1);
self.HintText setPoint("CENTER", "CENTER", 0, 60);
}
SprawdzajHint()
{
self endon("disconnect");
for(;;)
{
self.HintText setText(self.hint);
self.hint = "";
wait .1;
}
}
helped ya? rep me +
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
cool! thx for weapon pick up function!
Posts: 993
Threads: 86
Joined: Feb 2011
Reputation:
49
how do you setup CreateStraightWalls(start, end) and the table (start, end)
im not sure how to wright it im doing it like this and getting a syntax error
Code: Summit()
{
CreateStraightWalls(3710.17, -1654.14, 320.125), (3723.1, -1406.52, 456.125);
}
Posts: 379
Threads: 37
Joined: Dec 2010
Reputation:
6
(03-17-2011, 05:54)rotceh_dnih Wrote: how do you setup CreateStraightWalls(start, end) and the table (start, end)
im not sure how to wright it im doing it like this and getting a syntax error
Code: Summit()
{
CreateStraightWalls(3710.17, -1654.14, 320.125), (3723.1, -1406.52, 456.125);
}
i think the comma is not need, though i havent looked into the building functions.
Look in to itszombie mod because it used it
Posts: 1,830
Threads: 104
Joined: Jan 2011
Reputation:
46
(03-17-2011, 05:54)rotceh_dnih Wrote: how do you setup CreateStraightWalls(start, end) and the table (start, end)
im not sure how to wright it im doing it like this and getting a syntax error
Code: Summit()
{
CreateStraightWalls(3710.17, -1654.14, 320.125), (3723.1, -1406.52, 456.125);
}
CreateStraightWalls((3710.17, 1654.14, 320.125), (3723.1, 1406.52, 456.125))
you forgot some ( )'s
Posts: 993
Threads: 86
Joined: Feb 2011
Reputation:
49
03-17-2011, 08:37
(This post was last modified: 03-17-2011, 09:00 by rotceh_dnih.)
yea i think i tried that but i keeped the ; at the end should i try takeing that out ?
edit: error Unkown Fuction (see console for details) getting the same error when trying CreateRamps
at the moment im just trying to add it to your Old school mod like this
Code: /**
//////////////////////////////////////////////////////////////////////////////
///////////////////////////Building functions/////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
**/
CreateRamps(top, bottom)
{
D = Distance(top, bottom);
blocks = roundUp(D/35);
CX = top[0] - bottom[0];
CY = top[1] - bottom[1];
CZ = top[2] - bottom[2];
XA = CX/blocks;
YA = CY/blocks;
ZA = CZ/blocks;
CXY = Distance((top[0], top[1], 0), (bottom[0], bottom[1], 0));
Temp = VectorToAngles(top - bottom);
BA = (Temp[0], Temp[1], Temp[2]);
for(b = 0; b < blocks; b++){
block = spawn("script_model", (bottom + ((XA, YA, ZA) * B)), 1);
block setModel(level.crateModelFriendly);
block.angles = BA;
block SetOwner( level );
wait 0.01;
}
block = spawn("script_model", (bottom + ((XA, YA, ZA) * blocks) - (0, 0, 5)), 1);
block setModel(level.crateModelFriendly);
block.angles = (0, BA[1], BA[2]);
block SetOwner( level );
wait 0.01;
}
CreateWeapon(weapon, name, pos, angle, stock, respawntime)
{
weapon_model = getWeaponModel(weapon);
if(weapon_model == ""){
weapon_model = weapon;
}
Wep = spawn("script_model", pos+(0,0,30), 1);
Wep.angles = angle;
Wep SetOwner( level );
Wep setModel(weapon_model);
Wep thread WeaponThink(weapon, name, pos, angle, stock, respawntime);
wait 0.01;
}
WeaponThink(weapon, name, pos, angle, stock, respawntime)
{
area = spawn("trigger_radius", pos+(0,0,30), 0, 25, 50);
while(1)
{
area waittill("trigger", player);
player.hint = "Press ^3[{+activate}] ^7to pick up " + name;
if(player UseButtonPressed()){
switch( weapon )
{
case "frag_grenade_mp":
case "sticky_grenade_mp":
case "hatchet_mp":
case "flash_grenade_mp":
case "concussion_grenade_mp":
case "tabun_gas_mp":
case "nightingale_mp":
case "willy_pete_mp":
player takeWeapon(player getCurrentOffhand());
player giveWeapon( weapon );
player setWeaponAmmoClip( weapon, 2 );
break;
default:
player takeWeapon(player getCurrentWeapon());
player giveWeapon(weapon);
player SwitchToWeapon(weapon);
break;
}
if(stock > 1)
{
stock--;
}
else
{
if(isDefined(respawntime))
{
level thread WeaponRespawnThink(weapon, name, pos, angle, stock, respawntime);
}
area delete();
self delete();
return;
}
}
wait .04;
}
}
WeaponRespawnThink(weapon, name, pos, angle, stock, respawntime)
{
wait respawntime;
CreateWeapon(weapon, name, pos, angle, stock, respawntime);
}
createPickupGroundFX(origin, angles)
{
baseeffect = spawnFx( level.pickupgroundfx, origin);
baseeffect.angles = angles;
triggerFx( baseeffect );
}
createPickupGlowFX(origin, angles)
{
baseeffect = spawnFx( level.pickupglowfx, origin+(0,0,30) );
baseeffect.angles = angles;
triggerFx( baseeffect );
}
doMaps()
{
if(getDvar("mapname") == "mp_array")
{
level thread ArrayMap();
}
if(getDvar("mapname") == "mp_cairo")
{
level thread Havana();
}
if(getDvar("mapname") == "mp_cosmodrome")
{
level thread Launch();
}
if(getDvar("mapname") == "mp_cracked")
{
level thread Cracked();
}
if(getDvar("mapname") == "mp_crisis")
{
level thread Crisis();
}
if(getDvar("mapname") == "mp_duga")
{
level thread Grid();
}
if(getDvar("mapname") == "mp_firingrange")
{
level thread FiringRange();
}
if(getDvar("mapname") == "mp_hanoi")
{
level thread Hanoi();
}
if(getDvar("mapname") == "mp_havoc")
{
level thread Jungle();
}
if(getDvar("mapname") == "mp_mountain")
{
level thread Summit();
}
if(getDvar("mapname") == "mp_nuked")
{
level thread NukeTown();
}
if(getDvar("mapname") == "mp_radiation")
{
level thread Radiation();
}
if(getDvar("mapname") == "mp_russianbase")
{
level thread WMD();
}
if(getDvar("mapname") == "mp_villa")
{
level thread Villa();
}
}
ArrayMap()
{
}
Havana()
{
}
Launch()
{
}
Cracked()
{
}
Crisis()
{
}
Grid()
{
}
FiringRange()
{
}
Hanoi()
{
}
Jungle()
{
}
Summit()
{
CreateWeapon("mp5k_elbit_mp", "MP5k Red Dot", (3101.26, 1566.16, 362.125), (0, 0, 0), 1, 15);
CreateWeapon("mac11_rf_mp", "MAC11 Rapid Fire", (2590.35, -669.885, 330.125), (0, 0, 0), 1, 15);
CreateWeapon("m16_extclip_mp", "M16 Extended Mags", (4029.1, -882.752, 330.125), (0, 0, 0), 1, 15);
CreateWeapon("famas_reflex_mp", "Famas Reflex Sight", (3257.48, -1932.31, 466.125), (0, 0, 0), 1, 15);
CreateWeapon("fnfal_silencer_mp", "Silenced FAL", (2314.37, -1806.61, 402.125), (0, 0, 0), 1, 15);
CreateRamps((3710.17, 1654.14, 320.125), (3723.1, 1406.52, 456.125));
CreateWeapon("m60_elbit_grip_extclip_mp", "Rambo's little girl", (3701.93, 659.677, 330.125), (0, 0, 0), 1, 15);
CreateWeapon("l96a1_vzoom_mp", "L96 Variable Zoom", (2988.79, -76.4892, 330.125), (0, 0, 0), 1, 15);
CreateWeapon("spas_silencer_mp", "Silenced SPAS", (1749.22, -433.601, 111.455), (0, 0, 0), 1, 15);
level thread createPickupGroundFX((3101.26, 1566.16, 362.125), (90, 0, 0));
level thread createPickupGroundFX((2590.35, -669.885, 330.125), (90, 0, 0));
level thread createPickupGroundFX((4029.1, -882.752, 330.125), (90, 0, 0));
level thread createPickupGroundFX((3257.48, -1932.31, 466.125), (90, 0, 0));
level thread createPickupGroundFX((2314.37, -1806.61, 402.125), (90, 0, 0));
level thread createPickupGroundFX((3477.66, -1288.25, 466.125), (90, 0, 0));
level thread createPickupGroundFX((3701.93, 659.677, 330.125), (90, 0, 0));
level thread createPickupGroundFX((2988.79, -76.4892, 330.125), (90, 0, 0));
level thread createPickupGroundFX((1749.22, -433.601, 111.455), (90, 0, 0));
/**
level thread createPickupGlowFX((3101.26, 1566.16, 362.125), (90, 0, 0));
level thread createPickupGlowFX((2590.35, -669.885, 330.125), (90, 0, 0));
level thread createPickupGlowFX((4029.1, -882.752, 330.125), (90, 0, 0));
level thread createPickupGlowFX((3257.48, -1932.31, 466.125), (90, 0, 0));
level thread createPickupGlowFX((2314.37, -1806.61, 402.125), (90, 0, 0));
level thread createPickupGlowFX((3477.66, -1288.25, 466.125), (90, 0, 0));
level thread createPickupGlowFX((3701.93, 659.677, 330.125), (90, 0, 0));
level thread createPickupGlowFX((2988.79, -76.4892, 330.125), (90, 0, 0));
level thread createPickupGlowFX((1749.22, -433.601, 111.455), (90, 0, 0));
**/
}
NukeTown()
{
}
Radiation()
{
}
WMD()
{
}
Villa()
{
}
Posts: 1,830
Threads: 104
Joined: Jan 2011
Reputation:
46
03-17-2011, 09:09
(This post was last modified: 03-17-2011, 09:10 by iAegle.)
add this anywhere in your _rank.gsc and KEEP the ;
Code: roundUp( floatVal )
{
if ( int( floatVal ) != floatVal )
return int( floatVal+1 );
else
return int( floatVal );
}
Posts: 993
Threads: 86
Joined: Feb 2011
Reputation:
49
hay thanks now works but nothing show's up nither wall or ramp will see if i can find it in itszombie mod
Posts: 863
Threads: 50
Joined: Nov 2010
Reputation:
14
(03-17-2011, 11:16)rotceh_dnih Wrote: hay thanks now works but nothing show's up nither wall or ramp will see if i can find it in itszombie mod Put wait 2; b4 ur map code if u are using killingdyl's code, it takes time to spawn
|