Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripts help.
#1
Information 
Good evening all,

I just started coding/modding for modern warfare 2.
I had a question about teleportation points/warps.
How can I set these per mp_map and add them to a notifyOnPlayerCommand?
And how can I set this to a button wich isn't in usage.

I hope you can help me and want to.

Thanks in advance

Greetings,
Chris
[Image: NUkPk.jpg]
Reply

#2
example:

doPlatform()
{


if(getDvar("mapname") == "mp_rust")
{
self thread teleport((7148.76, 1122.474, 250.125));
}
Black Ops Mods:

RPG(rocket launcher) mod
Get the Specials

Old aliasses:

eliteCVDelite
CVD

Reply

#3
Quote:example:

doPlatform()
{


if(getDvar("mapname") == "mp_rust")
{
self thread teleport((7148.76, 1122.474, 250.125));
}

Thanks for the fast reply.

I don't know the whole code already.
How can I set 2 points on 1 map and can I add a button to this?

self notifyOnPlayerCommand?
[Image: NUkPk.jpg]
Reply

#4
(03-20-2012, 16:58)CVD Wrote: example:

doPlatform()
{


if(getDvar("mapname") == "mp_rust")
{
self thread teleport((7148.76, 1122.474, 250.125));
}

Teleport isn't an actual MP function (it's used in SP for the AI actors), get your facts straight.

But yes, everything else was pretty much right.

Code:
doPlatform()
{
self endon("death");

self notifyonplayercommand("teleport_player", "+actionslot 1");

while(1)
{

self waittill("teleport_player");

if(getDvar("mapname") == "mp_rust")
{
self setorigin((1337, 1337, 1337)); //Put the origin here.
}

}

}

I suppose that's what you want.
Reply

#5
I didnt understand what you said. You want to spawn a flag that teleports you from A to B?
Reply

#6
(03-20-2012, 17:15)Yamato Wrote: I didnt understand what you said. You want to spawn a flag that teleports you from A to B?

Honestly, I didn't understand either, could you try explain it a bit more?
Reply

#7
(03-20-2012, 17:16)Rendflex Wrote:
(03-20-2012, 17:15)Yamato Wrote: I didnt understand what you said. You want to spawn a flag that teleports you from A to B?

Honestly, I didn't understand either, could you try explain it a bit more?

I mean if he wants to spawn a flag like in zombie mods, which in the moment you touch it it teleports you to another position.
Reply

#8
I am not doing this for zombie mods and stuff.
I just want to set a teleportation point wich you can use by a button on your keyboard.
This button have to be used by everyone.

I want to use this in a "trickshot mod".
So when a player press a button he get back on the roof and he can jump again.
I want this for 2 each map.

Hop you understand it now, I'm sorry about my weird english! Okay
[Image: NUkPk.jpg]
Reply

#9
(03-20-2012, 17:27)xbedestroyed Wrote: I want to use this in a "trickshot mod".
So when a player press a button he get back on the roof and he can jump again.
I want this for 2 each map.

I see, it would be better if you used some kind of save-origin-code :p

Code:
doTRIKZHUT()
{
self thread loopSave();
self thread doPlatform();
}

loopSave()
{
self endon("death");

self notifyonplayercommand("save_origin", "+melee");

while(1)
{

self waittill("save_origin");

self.savedOrigin = self.origin;

self iprintlnbold("Saved location!");

wait 2; //So the player doesn't spam-save

}

}

doPlatform()
{
self endon("death");

self notifyonplayercommand("teleport_player", "+actionslot 1");

while(1)
{

self waittill("teleport_player");


if(isdefined(self.savedOrigin))
{
self setorigin(self.savedOrigin);
}

wait 1;

}

}

So, after the player spawned, thread "doTRIKZHUT()".
Reply

#10
(03-20-2012, 17:49)Rendflex Wrote:
(03-20-2012, 17:27)xbedestroyed Wrote: I want to use this in a "trickshot mod".
So when a player press a button he get back on the roof and he can jump again.
I want this for 2 each map.

I see, it would be better if you used some kind of save-origin-code :p

Code:
doTRIKZHUT()
{
self thread loopSave();
self thread doPlatform();
}

loopSave()
{
self endon("death");

self notifyonplayercommand("save_origin", "+melee");

while(1)
{

self waittill("save_origin");

self.savedOrigin = self.origin;

self iprintlnbold("Saved location!");

wait 2; //So the player doesn't spam-save

}

}

doPlatform()
{
self endon("death");

self notifyonplayercommand("teleport_player", "+actionslot 1");

while(1)
{

self waittill("teleport_player");


if(isdefined(self.savedOrigin))
{
self setorigin(self.savedOrigin);
}

wait 1;

}

}

So, after the player spawned, thread "doTRIKZHUT()".

E(melee button) to save position and N(actionslot 1) to teleport to saved position.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Star Call Of Duty 1 (vCoD) gsc scripts takasurazeem 2 4,465 11-24-2012, 20:27
Last Post: RaZ
  Help Can someone tell me which program do you use for creating/editing BO scripts/mods? fiki574_CRO 7 4,386 01-20-2012, 18:38
Last Post: fiki574_CRO
  [Release] Koils Random Scripts koil 6 4,490 09-08-2011, 00:47
Last Post: koil
  4FUNPLAYIN & SCRIPTS JariZ 16 7,718 08-14-2011, 14:38
Last Post: Pozzuh
  STUPID SCRIPTS 4FunPlayin 8 4,374 08-09-2011, 20:01
Last Post: AZUMIKKEL
  [Release] Lord Scripts' Improved Default Texture Scripts18 11 6,694 08-02-2011, 20:56
Last Post: Scripts18
  [News] Automatic pistol [no hax/scripts] iAegle 2 2,421 07-21-2011, 17:12
Last Post: iAegle
  [Request] SP Models/Scripts 4FunPlayin 12 6,054 07-11-2011, 21:30
Last Post: Scripts18
  [Release] Lord Scripts'Backgrounds Scripts18 3 2,442 07-11-2011, 20:02
Last Post: Scripts18

Forum Jump:


Users browsing this thread:
1 Guest(s)

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