Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Random Things 6
#1
Hello, Nyan Cat

New tutorial about random things, first command: ForceUseHintOn, call it on a turret, it has the same effect as cursorhintstring, but this will remain on the player until you stop it. An example of its use is the sentry guns(the text that says: press 4 to place sentry gun)

Code:
turret ForceUseHintOn("text or string");

Example:

Code:
if(!turret isOnGround())
    turret ForceUseHint("You are in air");
else
    turret ForceUseHint("You are in land");

To stop its effect you can use:

Code:
self ForceUseHintOff();

Now, a turret command: SetDefaultDropPitch. It regulates the Pitch angle that the turret gets when you leave it.

Code:
turret SetDefaultDropPitch(0); //with 0, will make that when you leave it, the pitch will be 0.

Now a waiting command:

Code:
self waittill_any("notification 1","notification 2","notification 3"); //max number of notifications are 8

Lets put an example:

Code:
KillHudElem(elem)
{
    self waittill_any("disconnect","death","spawned_player");    
    if(isdefined(elem))
        elem destroy();
}

Now a FX command: GetFX, it will return the name of a FX(level._effect ones):

Code:
PlayFxOnTag(GetFx("room_smoke_200"),self,"tag_origin");

Now, is the turn of a weapon command: WeaponFireTime, it will return the rate of fire of a certain weapon, for example:

Code:
ump45 = WeaponFireTime("ump45_mp");

Another command is SetCanRadiusDamage, is really similar to SetCanDamage, but this one is for radiusdamages, most entities have this one on true, so you can use this command to avoid something to be killed by radiusdamages. Works like this:

Code:
self SetCanRadiusDamage(false); //it will avoid radiusdamage.

Now, another vector command, is really similar to the command PointOnSegmentNearestToPoint I explained on a previous tutorial, the difference is that this will return the perpendicular vector to the line that goes from line to the point.

Code:
vector = VectorFromLineToPoint(A,B,Point); //A and B are the segment ends

Now a command: string_starts_with, it will analize the string and the start, if the start is contained in the string beginning, will return true, Example:

Code:
ExampleFailThread()
{
    if(string_starts_with(self.name,"OMA"))
        self giveWeapon("onemanarmy_mp",0,false);
}

Now UAV and Counter UAV commands:

Code:
BlockTeamRadar("team name"); //to block it
UnblockTeamRadar("team name"); //to unblock it
SetTeamRadar("team name",value); //to add radar. Put in value 1 for enabled and 0 for unabled

Thats it guys, OMA

Reply

#2
self ForceUseHint("");
Unknown function :/
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
(10-11-2011, 13:56)Se7en Wrote: self ForceUseHint("");
Unknown function :/

Maybe it needs a #include
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#4
included .. all files
nope.avi
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#5
y u random things?
y u no random shit?
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply

#6
(10-11-2011, 13:56)Se7en Wrote: self ForceUseHint("");
Unknown function :/

mw2 function not black ops
[Image: MaEIQ.png]
Reply

#7
(10-11-2011, 16:04)Pozzuh Wrote:
(10-11-2011, 13:56)Se7en Wrote: self ForceUseHint("");
Unknown function :/

mw2 function not black ops

No, no he is right, I did a mistake, I put self in the example from a code I was using in which self was a misc_turret. @SE7EN Use the command in a turret.
Reply

#8
Yamato can you make a tutorial how to make custom shaders like
[Image: 1fxsnb.jpg]

or shaders in chat>?
[Image: 1fxsnb.jpg]
Reply

#9
(10-12-2011, 11:44)4FunPlayin Wrote: Yamato can you make a tutorial how to make custom shaders like
[Image: 1fxsnb.jpg]

or shaders in chat>?

Shaders in chat is not posible, but making that shader is posible, Big Grin, you just need LOOOOOOT of patience, Go in IW_02, inside there are some shaders(spinning nuke, spinning emp, spinning harrier....(cardicons)), do a skin on them, the problem is that each of those files have inside like 12 images, you will have to edit 1 per 1. Confused
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  GTA V fun things RaZ 4 4,712 05-06-2015, 18:55
Last Post: RaZ
  [Release] [SOURCE] Random Weapons. [HARD] Tony. 1 4,106 11-08-2013, 11:11
Last Post: Nekochan
  Help source random weapons [HARD] Tony. 4 4,708 11-08-2013, 05:25
Last Post: [HARD] Tony.
  Help choose 2 random players?(1 each team) 26hz 6 4,650 09-12-2013, 17:32
Last Post: Yamato
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 33,293 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
Exclamation [Request] Random Weapon At Spawn Scripts18 3 4,739 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Receiving a random primary & secondary DidUknowiPwn 5 4,406 07-22-2013, 09:47
Last Post: Yamato
  What script controls the "random" aspect to care packages? akillj 2 3,267 06-05-2013, 11:24
Last Post: akillj
  Random anims master131 14 10,811 05-24-2013, 09:45
Last Post: [HARD] Tony.
  [Request] Random player model hillbilly 1 2,746 05-12-2013, 08:30
Last Post: archit

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.