Three Arena's.

Started by Gito Baloch, Apr 10, 2020, 09:31 AM

Previous topic - Next topic

Gito Baloch

class PlayerClass
{
 m4 = false;
 shotgun = false;
 stubby = false;
}

FUNCTIONS
function stubby(player)
{
local player = FindPlayer(player);
stubby = true;
m4 = false;
shotgun = false;
player.Disarm();
player.SetWeapon(21,10000);
player.Pos = Vector(-1623.99, -498.612, 50.1828);
MessagePlayer("[#ffffff]"+player.Name+"[#ffcfcc]Has teleported to stubby arena.",player);
}
function shotgun(player)
{
local player = FindPlayer(player);
shotgun = true;
m4 = false;
stubby = false;
player.Disarm();
player.SetWeapon(19,10000);
player.Pos = Vector(-1623.99, -498.612, 50.1828);
MessagePlayer("[#ffffff]"+player.Name+"[#ffcfcc]Has teleported to shotgun arena.",player);
}
function m4(player)
{
local player = FindPlayer(player);
m4 = true;
shotgun = false;
stubby = false;
player.Disarm();
player.SetWeapon(26,10000);
player.Pos = Vector(-1623.99, -498.612, 50.1828);
MessagePlayer("[#ffffff]"+player.Name+"[#ffcfcc]Has teleported to m4 arena.",player);
}
function arena(player)
{
local player = FindPlayer(player);
if ( m4 == true )
{
MessagePlayer("[#ffcccc]You spawned at m4 arena",player);
player.Pos = Vector(-1623.99, -498.612, 50.1828);
player.Disarm();
player.SetWeapon(26,10000);
}
else if ( stubby == true )
{
MessagePlayer("[#ffcccc]You spawned at stubby arena",player);
player.Pos = Vector(-1623.99, -498.612, 50.1828);
player.Disarm();
player.SetWeapon(21,10000);
}
else if ( shotgun == true )
{
MessagePlayer("[#ffcccc]You spawned at shotgun arena",player);
player.Pos = Vector(-1623.99, -498.612, 50.1828);
player.Disarm();
player.SetWeapon(19,10000);
}
}

onPlayerSpawn
NewTimer("arena",500 , 1, player.ID)
onPlayerCommand
else if (cmd == "arena")
{
if (player.IsSpawned == false) MessagePlayer("[#ffff00]You must spawn to use this command!",player);
else {
if (!text) MessagePlayer("[#ffff00]Required /arena [[#ffffff]m4,shotgun,stubby[#ffff00]]",player);
{
if (text =="m4")
{
if ( shotgun == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
else if ( stubby == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
else {
MessagePlayer("[#ffcffc]Teleporting wait 3 seconds",player);
NewTimer("m4", 3000, 1 ,player.ID);
}
}
if (text =="stubby")
if ( shotgun == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
else if ( m4 == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
else {
MessagePlayer("[#ffcffc]Teleporting wait 3 seconds",player);
NewTimer("stubby", 3000, 1 ,player.ID);
            }
}
                        if (text =="shotgun")
if ( m4 == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
else if ( stubby == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
else {
MessagePlayer("[#ffcffc]Teleporting wait 3 seconds",player);
NewTimer("shotgun", 3000, 1 ,player.ID);
 }
 }
}
else if (cmd =="leave")
{
player.World =1;
m4 = false;
stubby = false;
shotgun = false;
MessagePlayer("[#ff0000]You left the arena.",player);
}

IF YOU FIND ANY BUG DON"T TELL ME IM BEGINNER I CAN"T FIX XD
Programming is the language I speak, the world I shape, and the future I code

EnForcer

Yea You cant fix just because u also copied this from somewhere

else if (cmd == "arena")
   {
   if (player.IsSpawned == false) MessagePlayer("[#ffff00]You must spawn to use this command!",player);
   else {
   if (!text) MessagePlayer("[#ffff00]Required /arena [[#ffffff]m4,shotgun,stubby[#ffff00]]",player);
   {
   if (text =="m4")
   {
  if ( shotgun == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
  else if ( m4 == true ) MessagePlayer("[#ff0000]You are Already in m4 arena type /leave to exit",player);
  else if ( stubby == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
  else {
MessagePlayer("[#ffcffc]Teleporting wait 3 seconds",player);
NewTimer("m4", 3000, 1 ,player.ID);
   }
   }
      if (text =="stubby")
        if ( shotgun == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
else if ( stubby == true ) MessagePlayer("[#ff0000]You are already in Stubby arena type /leave to exit",player);
  else if ( m4 == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
  else {
MessagePlayer("[#ffcffc]Teleporting wait 3 seconds",player);
NewTimer("stubby", 3000, 1 ,player.ID);
            }
   }
                        if (text =="shotgun")
        if ( m4 == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
  else if ( stubby == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
    else if ( shotgun == true ) MessagePlayer("[#ff0000]You are already in shotgun arena type /leave to exit",player);
  else {
  MessagePlayer("[#ffcffc]Teleporting wait 3 seconds",player);
NewTimer("shotgun", 3000, 1 ,player.ID);
 }
 }


Gito Baloch

Quote from: EnForcer on Apr 10, 2020, 11:15 AMYea You cant fix just because u also copied this from somewhere

else if (cmd == "arena")
   {
   if (player.IsSpawned == false) MessagePlayer("[#ffff00]You must spawn to use this command!",player);
   else {
   if (!text) MessagePlayer("[#ffff00]Required /arena [[#ffffff]m4,shotgun,stubby[#ffff00]]",player);
   {
   if (text =="m4")
   {
  if ( shotgun == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
  else if ( m4 == true ) MessagePlayer("[#ff0000]You are Already in m4 arena type /leave to exit",player);
  else if ( stubby == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
  else {
MessagePlayer("[#ffcffc]Teleporting wait 3 seconds",player);
NewTimer("m4", 3000, 1 ,player.ID);
   }
   }
      if (text =="stubby")
        if ( shotgun == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
else if ( stubby == true ) MessagePlayer("[#ff0000]You are already in Stubby arena type /leave to exit",player);
  else if ( m4 == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
  else {
MessagePlayer("[#ffcffc]Teleporting wait 3 seconds",player);
NewTimer("stubby", 3000, 1 ,player.ID);
            }
   }
                        if (text =="shotgun")
        if ( m4 == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
  else if ( stubby == true ) MessagePlayer("[#ff0000]You are in arena type /leave to exit",player);
    else if ( shotgun == true ) MessagePlayer("[#ff0000]You are already in shotgun arena type /leave to exit",player);
  else {
  MessagePlayer("[#ffcffc]Teleporting wait 3 seconds",player);
NewTimer("shotgun", 3000, 1 ,player.ID);
 }
 }


bruh i myself write this command last night lol any evidence i copied it? wtf idiot.
Programming is the language I speak, the world I shape, and the future I code