script
Code: Select all
{
Team [0] // Team vars
selected [false]
handgun [null]
main [null]
pressed [false]
Target [null]
Spawn[ ()
{
Console(true); // Console Set
SetNoCollision(); // Set No Coll
LowLevel("Setup");
} ]
Setup[ ()
{
PawnRender(false); // Dont Render Pawn
ShowMouse(true); // show mouse
MouseControlledPlayer(false);
SetHudDraw(false);
PlayerToPosition(5, 0, 0);
Target = MouseSelect(true, true, 255, 2, 2); // stores entityname of selected pawn in the var Target
if(Target = "USMC")
{
if(self.lbutton_pressed = true)
{
PlaySound("respawn.wav");
Team = 1;
ShowMouse(false);
pressed = true;
self.think = "Guns";
}
}
if(Target = "Terrorist")
{
if(self.lbutton_pressed = true)
{
PlaySound("respawn.wav");
Team = 2;
ShowMouse(false);
pressed = true;
self.think = "Guns";
}
}
} ]
Guns[ ()
{
ShowMouse(false);
self.ThinkTime = "0.4";
PlayerToPosition(5, 0, 0);
ShowText(1, "", "", "Sidearm-Press 1 for Glock, 2 for Socom", 10, "", 500, 400, "center", 255);
if(IsKeyDown(1) = true)
{
SetAttribute("glock", 1, "Player" ); // give glock
PlaySound("respawn.wav");
pressed = true;
self.think = "Primary";
}
if(IsKeyDown(2) = true)
{
SetAttribute("mk23", 1, "Player" ); // give mk23
PlaySound("respawn.wav");
pressed = true;
self.think = "Primary";
}
} ]
Primary[ ()
{
self.ThinkTime = "0.4";
ShowMouse(false);
if(Team = 1)
{
if(GetAttribute("guns", "Player") = 0)
{
ShowText(1, "", "", "Primary-Press 1 for M16, 2 for FAMAS", 10, "", 500, 400, "center", 255);
ShowText(2, "", "", "Primary-Press 3 for UMP, 4 for MP7", 10, "", 500, 500, "center", 255);
ShowText(3, "", "", "Primary-Press 5 for MG36, 6 for L96", 10, "", 500, 600, "center", 255);
ShowText(4, "", "", "Primary-Press 7 for M3, 8 for nothing", 10, "", 500, 700, "center", 255);
if(IsKeyDown(1) = true)
{
SetAttribute("m16", 1, "Player" ); // give m16
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(2) = true)
{
SetAttribute("famas", 1, "Player" ); // give famas
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(3) = true)
{
SetAttribute("ump", 1, "Player" ); // give ump
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(4) = true)
{
SetAttribute("mp7", 1, "Player" ); // give mp7
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(5) = true)
{
SetAttribute("mg36", 1, "Player" ); // give mg
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(6) = true)
{
SetAttribute("awp", 1, "Player" ); // give awp
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(7) = true)
{
SetAttribute("m3", 1, "Player" ); // give m3
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(8) = true)
{
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
}
else
{
ShowText(1, "", "", "Primary-Press 1 for L85, 2 for SIG552", 10, "", 500, 400, "center", 255);
ShowText(2, "", "", "Primary-Press 3 for Slienced MP5, 4 for UZI", 10, "", 500, 500, "center", 255);
ShowText(3, "", "", "Primary-Press 5 for MG36, 6 for L96", 10, "", 500, 600, "center", 255);
ShowText(4, "", "", "Primary-Press 7 for M3, 8 for nothing", 10, "", 500, 700, "center", 255);
if(IsKeyDown(1) = true)
{
SetAttribute("l85", 1, "Player" ); // give L85
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(2) = true)
{
SetAttribute("sig", 1, "Player" ); // give SIG
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(3) = true)
{
SetAttribute("mp5", 1, "Player" ); // give mp5
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(4) = true)
{
SetAttribute("uzi", 1, "Player" ); // give uzi
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(5) = true)
{
SetAttribute("mg36", 1, "Player" ); // give mg
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(6) = true)
{
SetAttribute("awp", 1, "Player" ); // give awp
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(7) = true)
{
SetAttribute("m3", 1, "Player" ); // give m3
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(8) = true)
{
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
}
}
else
{
if(GetAttribute("guns", "Player") = 0)
{
ShowText(1, "", "", "Primary-Press 1 for AK47, 2 for IMI Galil", 10, "", 500, 400, "center", 255);
ShowText(2, "", "", "Primary-Press 3 for Mac, 4 for PP19", 10, "", 500, 500, "center", 255);
ShowText(3, "", "", "Primary-Press 5 for MG36, 6 for L96", 10, "", 500, 600, "center", 255);
ShowText(4, "", "", "Primary-Press 7 for M3, 8 for nothing", 10, "", 500, 700, "center", 255);
if(IsKeyDown(1) = true)
{
SetAttribute("ak47", 1, "Player" ); // give ak
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(2) = true)
{
SetAttribute("galil", 1, "Player" ); // give galil
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(3) = true)
{
SetAttribute("mac", 1, "Player" ); // give mak
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(4) = true)
{
SetAttribute("pp19", 1, "Player" ); // give bizon
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(5) = true)
{
SetAttribute("mg36", 1, "Player" ); // give mg
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(6) = true)
{
SetAttribute("awp", 1, "Player" ); // give awp
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(7) = true)
{
SetAttribute("m3", 1, "Player" ); // give m3
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(8) = true)
{
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
}
else
{
ShowText(1, "", "", "Primary-Press 1 for L85, 2 for SIG552", 10, "", 500, 400, "center", 255);
ShowText(2, "", "", "Primary-Press 3 for Slienced MP5, 4 for UZI", 10, "", 500, 500, "center", 255);
ShowText(3, "", "", "Primary-Press 5 for MG36, 6 for L96", 10, "", 500, 600, "center", 255);
ShowText(4, "", "", "Primary-Press 7 for M3, 8 for nothing", 10, "", 500, 700, "center", 255);
if(IsKeyDown(1) = true)
{
SetAttribute("l85", 1, "Player" ); // give L85
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(2) = true)
{
SetAttribute("sig", 1, "Player" ); // give SIG
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(3) = true)
{
SetAttribute("mp5", 1, "Player" ); // give mp5
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(4) = true)
{
SetAttribute("uzi", 1, "Player" ); // give uzi
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(5) = true)
{
SetAttribute("mg36", 1, "Player" ); // give mg
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(6) = true)
{
SetAttribute("awp", 1, "Player" ); // give awp
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(7) = true)
{
SetAttribute("m3", 1, "Player" ); // give m3
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
if(IsKeyDown(8) = true)
{
PlaySound("respawn.wav");
pressed = true;
self.think = "GO";
}
}
}
} ]
GO[ ()
{
ShowMouse(false); // no mouse
MouseControlledPlayer(true);
SetHudDraw(true);
if(Team = 1)
{
SetEventState("restart", true);
}
if(Team = 2)
{
SetEventState("restart2", true);
}
} ]
}