Check with SCS
Here is a link to their forums: http://scsclan.org/forum/index.php">http://scsclan.org/forum/index.php
Ski
Here is a link to their forums: http://scsclan.org/forum/index.php">http://scsclan.org/forum/index.php
Ski
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu



//// Pistol Swap Script Made Possible By Unreal_Demon, Elgan, Habsey and others
//// Tested and put together By :^BONES^: Ski
//// Thanks to Unreal_Demon, Elgan, Habsey for all their help!
Main:
if (level.pistol_exhange)
end
level.pistol_exhange = 1
while (1)
{
local.pistol_swap_cvar = getcvar("pistol_swap")
if(local.pistol_swap_cvar == "1")
{
for(local.i = 1; local.i <= $player.size; local.i ++)
{
if ( !($player[local.i].pistol_swapped) && ($player[local.i].dmteam != "spectator") )
{
$player[local.i].pistol_swapped = 1
if($player[local.i].dmteam == "allies")
$player[local.i] take "models/weapons/colt45.tik"
if($player[local.i].dmteam == "axis")
$player[local.i] take "models/weapons/p38.tik"
$player[local.i] give "models/weapons/silencedpistol.tik"
$player[local.i] thread check_for_death
}
wait .5
}
}
wait 1
}
end
check_for_death:
local.team = self.dmteam
while(1)
{
if( (self.dmteam != local.team) || (self.health <= 0) )
{
$player[local.i].pistol_swapped = 0
end
}
wait 1
}
end
level waittill spawn
exec global/pistol_swap.scr
Main:
if (level.pistol_exhange)
end
level.pistol_exhange = 1
while (1)
{
local.pistol_swap_cvar = getcvar("g_pistol_swap")
if(local.pistol_swap_cvar == "1")
{
for(local.i = 1; local.i <= $player.size; local.i ++)
{
if !($player[local.i].pistol_swapped)
{
$player[local.i].pistol_swapped = 1
$player[local.i] take "models/weapons/colt45.tik"
$player[local.i] take "models/weapons/p38.tik"
$player[local.i] give "models/weapons/silencedpistol.tik"
$player[local.i] thread check_for_death
}
wait .5
}
}
wait 1
}
end
check_for_death:
while(isAlive self)
waitframe
$player[local.i].pistol_swapped = 0
end
level waittill spawn
exec global/pistol_swap.scr
main:
while(1)
{
if (local.pistol_exhange = 1)
{
end
}
else if (local.pistol_exhange != 1)
{
local.pistol_exhange = 1
take "models/weapons/colt45.tik"
take "models/weapons/p38.tik" //make sure to change this cant remember the correct .tik file
namegive "models/weapons/silencedpistol.tik" //make sure to change this cant remember the correct .tik file name
}
wait 1
}
end
cache models/vehicles/jeep_30cal.tik
if(getcvar(g_pistol_swap) == "1")
{
exec global/pistol_swap.scr
}
end