(adsbygoogle = window.adsbygoogle || []).push({});
Well I have this problem that I tried to do and failed. Well basically I wanted to put the random box code in but I got stuck to the part when Elitemossy say to put the self thread doRandomBox thing in somewhere that I dont know. Can some explain what is self thread and where to put it.
RANDOM WEAPON BOX
Simply call self thread CreateWepBox();
Code:
CreateWepBox()
{
T=self.pers["team"];
p2=self GetCursorPos();
B=spawn("script_model",p2);
B setModel("com_plasticcase_beige_big");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
W=spawn("script_model",p2);
W Solid();
RM=randomint(9999);
for(;
{
foreach(P in level.players)
{
wait 0.05;
if(P.pers["team"]!=T)continue;
D=distance(p2,P.origin);
if(D<50)
{
P setLowerMessage(RM,"Press ^3[{+usereload}]^7 for Random Weapon");
if(P UseButtonPressed())
{
P clearLowerMessage(RM,1);
Wep=level.weaponList[randomint(level.weaponList.size)];
W setModel(getWeaponModel(Wep));
W MoveTo(p2+(0,0,55),0.9);
wait 0.8;
if(P GetWeaponsListPrimaries().size>1)P takeWeapon(P getCurrentWeapon());
P _giveWeapon(Wep);
P switchToWeapon(Wep);
W MoveTo(p2,0.01);
:hitman: