Admin ONLY teleporter
Moderator: Core Staff
Admin ONLY teleporter
Is there a way i can put a normal teleporter on my map, but only the server admins can use and be teleport so if a normal and VIP player stand on it nothing happens and doesnt teleport them
-
- CJ G0D!
- Posts: 1575
- Joined: June 3rd, 2009, 9:02 pm
- Location: Cardiff University, UK
Re: Admin ONLY teleporter
Code: Select all
onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player );
if(player getGuid() == "34729847392874923")
{
player.admin = 1;
}
}
}
triggerstuff()
{
........
while(1)
{
trigger waittill("trigger", player);
if(isdefined(player.admin))
{
//do teleport
}
}
}
-
Re: Admin ONLY teleporter
Okay thankyou, im a big noob so where do i need to add this.. in my GSC?
if so, where abouts..
if so, where abouts..
Code: Select all
main()
{
//maps\mp\mp_levels_fx::main();
//maps\createart\mp_levels_art::main();
maps\mp\_load::main();
//maps\mp\mp_levels_struct::main();
maps\mp\_teleport::main();
//maps\mp\_compass::setupMiniMap("compass_map_mp_backlot");
//setExpFog(500, 2200, 0.81, 0.75, 0.63, 0);
//VisionSetNaked( "mp_levels" );
ambientPlay("ambient_explicit_ext");
game["allies"] = "marines";
game["axis"] = "opfor";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "desert";
game["axis_soldiertype"] = "desert";
setdvar( "r_specularcolorscale", "1" );
setdvar("r_glowbloomintensity0",".25");
setdvar("r_glowbloomintensity1",".25");
setdvar("r_glowskybleedintensity0",".3");
setdvar("compassmaxrange","1800");
thread kill();
thread quake();
}
quake()
{
trigger = getent("earthquake","targetname"); // this finds the entity you created (the trigger)
quake = getent("quake","targetname"); // this finds the entity you created (the origin named quke)
sound = getent("sound","targetname"); // this finds the entity you created (the origin named sound)
while (1)
{
trigger waittill ("trigger",user);
wait 1;
iprintlnbold( "EAARRTHHHQUUAAKKE!!!"); //prints inbold "EAARRTHHHQUUAAKKE!!!" to all the users on the map, feel free to change the text :)
sound PlaySound( "elm_quake_sub_rumble"); //plays the sound of an earthquake at the origin "sound"
Earthquake( 0.7, 8, quake.origin, 10000 ); // (magnitude of the earthquake, length, at what origin, and the radius) these values can be changed apart from the origin
wait 2;
}
}
kill()
{
your_trigger_name = getent( "trigger","targetname" );
while (1)
{
trigger waittill ("trigger",player);
player suicide();
}
}
Re: Admin ONLY teleporter
Code: Select all
Â
main()
{
    //maps\mp\mp_levels_fx::main();
    //maps\createart\mp_levels_art::main();
    maps\mp\_load::main();
    //maps\mp\mp_levels_struct::main();  Â
    maps\mp\_teleport::main();
Â
    //maps\mp\_compass::setupMiniMap("compass_map_mp_backlot");
Â
    //setExpFog(500, 2200, 0.81, 0.75, 0.63, 0);
    //VisionSetNaked( "mp_levels" );
    ambientPlay("ambient_explicit_ext");
Â
    game["allies"] = "marines";
    game["axis"] = "opfor";
    game["attackers"] = "axis";
    game["defenders"] = "allies";
    game["allies_soldiertype"] = "desert";
    game["axis_soldiertype"] = "desert";
Â
    setdvar( "r_specularcolorscale", "1" );
Â
    setdvar("r_glowbloomintensity0",".25");
    setdvar("r_glowbloomintensity1",".25");
    setdvar("r_glowskybleedintensity0",".3");
    setdvar("compassmaxrange","1800");
Â
    thread kill();
    thread quake();
    thread admintell();
Â
}
Â
Â
Â
quake()
Â
{
trigger = getent("earthquake","targetname"); // this finds the entity you created (the trigger)
quake = getent("quake","targetname"); Â Â Â // this finds the entity you created (the origin named quke)
sound = getent("sound","targetname"); Â Â Â // this finds the entity you created (the origin named sound)
while (1)
Â
  {
  trigger waittill ("trigger",user);
  wait 1;
  iprintlnbold( "EAARRTHHHQUUAAKKE!!!");   //prints inbold "EAARRTHHHQUUAAKKE!!!" to all the users on the map, feel free to change the text :)
  sound PlaySound( "elm_quake_sub_rumble");  //plays the sound of an earthquake at the origin "sound"
  Earthquake( 0.7, 8, quake.origin, 10000 ); // (magnitude of the earthquake, length, at what origin, and the radius) these values can be changed apart from the origin
  wait 2;
  }
}
Â
Â
Â
Â
Â
kill()
Â
{ Â
Â
your_trigger_name = getent( "trigger","targetname" );
Â
  while (1)
Â
  {
Â
   trigger waittill ("trigger",player);
Â
       player suicide();
Â
   }
Â
 }
Â
admintell()
{
trig = getent("admintrig","targetname");
Â
while(true)
  {
     trig waittill("trigger", player);
     if(player.cj["status"] == 2)
     {
      player setOrigin((0, 0, 0));//set the origin of where to port to
     }
     wait 1;
    }
Â
}
Â
Who is online
Users browsing this forum: No registered users and 4 guests