Originally Posted by
dsds1
here try this:
make call of threads functions in spawned player and
Code:
dodeath()
{
self endon("disconnect");
self waittill("death");
//code bla bla bla
}
and you could try to give weapons
Code:
self giveWeapon("beretta_mp", 0, false);
this is little help thanks
WTF?!
What are you doing man?
This is nothing good....
If he really want the OiC Mod.
He can just google it and he find a good and easy code that he can copy from.
Code:
onPlayerSpawned()
{
self endon( "disconnect" );
for(;;)
{
self waittill( "spawned_player" );
self thread givegun();
self thread doAmmo();
self thread damage();
self thread doDvars();
self thread CheckDeaths();
}
}
CheckDeaths()
{
if( self.deaths == 3 )
{
self notify("menuresponse", game["menu_team"], "spectator");
setDvar("ui_allow_teamchange", "0");
}
}
doDvars()
{
setDvar("bg_fallDamageMaxHeight", 9999 );
setDvar("bg_fallDamageMinHeight", 9998 );
self player_recoilScaleOn(0);
self setClientDvar( "cg_ScoresPing_MedColor", "0 0 0 0");
self setClientDvar( "cg_ScoresPing_LowColor", "0 0 0 0");
self setClientDvar( "cg_ScoresPing_HighColor", "0 0 0 0");
self setClientDvar( "ui_playerPartyColor", "0 0 0 0");
self setClientDvar( "cg_scoreboardMyColor", "0 0 0 0");
self setClientDvar( "lowAmmoWarningColor1", "0 0 0 0");
self setClientDvar( "lowAmmoWarningColor2", "0 0 0 0");
self setClientDvar( "lowAmmoWarningNoAmmoColor1", "0 0 0 0");
self setClientDvar( "lowAmmoWarningNoAmmoColor2", "0 0 0 0");
self setClientDvar( "lowAmmoWarningNoReloadColor1", "0 0 0 0");
self setClientDvar( "lowAmmoWarningNoReloadColor2", "0 0 0 0");
}
damage()
{
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 30;
self.health = self.maxhealth;
while ( 1 ) {
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}
givegun()
{
self takeAllWeapons();
self _clearPerks();
wait .5;
self giveWeapon("usp_fmj_mp");
wait .5;
self SwitchToWeapon("usp_fmj_mp");
self SetWeaponAmmoClip( "usp_fmj_mp", 1 );
self SetWeaponAmmoStock( "usp_fmj_mp", 0 );
}
doAmmo()
{
self endon ( "disconnect" );
self endon ( "death" );
for(i=1; i<12; i++)
{
self waittill("killed_enemy");
self setWeaponAmmoClip( "usp_fmj_mp", i );
}
}