Post: [Tutorial] Spawn Team Icon on Model's
03-10-2011, 03:39 PM #1
xQuZe-
You talkin to me?
(adsbygoogle = window.adsbygoogle || []).push({});
In this tutorial i will be showing you how to spawn team icon's on any model.
Just like on a claymore. Like this:


You must login or register to view this content.



How to do this:
First we need the normal code for spawning a model.
    level.quze = spawn( "script_model", (self.origin+(0,-200,10)) );
level.quze setModel("[COLOR="Red"]com_plasticcase_friendly[/COLOR]");


We can change the model the any model.

You must login or register to view this content.

So we can also just change it to a Blow-up Doll.
You must login or register to view this content.

Here is the code for spawning a team icon.
    quzeTeamHeadIcon( team )
{
self endon( "death" );
wait .05;
if ( level.teamBased )
self maps\mp\_entityheadicons::setTeamHeadIcon( team, ( 0, 0, [COLOR="Blue"]30[/COLOR] ) );
else if ( isDefined( self.owner ) )
self maps\mp\_entityheadicons::setPlayerHeadIcon( self.owner, (0,0,[COLOR="blue"]30[/COLOR]) );
}


Back to our model spawning code.
    [COLOR="red"]level.quze [/COLOR]= spawn( "script_model", (self.origin+(0,-200,10)) );
[COLOR="red"]level.quze [/COLOR]setModel("com_plasticcase_friendly");


See how I named it level.quze?
We can name it everything.
As long as we name it all the same.

So now we gonna add the thread for the team icon.
    level.quze = spawn( "script_model", (self.origin+(0,-200,10)) );
level.quze setModel("com_plasticcase_friendly");
level.quze thread quzeTeamHeadIcon( self.pers[ "team" ] );


We now called the thread for spawning the icon on level.quze ; our model.
Normally we would use self thread... But it now spawns on level.quze.
If you use another model you should change the height of the icon.
Just change it untill you like it.

Now just add the thread somewhere and you're done. Smile
Our code should be something like this:
    spawnModel()
{
level.quze = spawn( "script_model", (self.origin+(0,-200,10)) );
level.quze setModel("com_plasticcase_friendly");
level.quze thread quzeTeamHeadIcon( self.pers[ "team" ] );
}

quzeTeamHeadIcon( team )
{
self endon( "death" );
wait .05;
if ( level.teamBased )
self maps\mp\_entityheadicons::setTeamHeadIcon( team, ( 0, 0, [COLOR="blue"]30[/COLOR] ) );
else if ( isDefined( self.owner ) )
self maps\mp\_entityheadicons::setPlayerHeadIcon( self.owner, (0,0,[COLOR="Blue"]30[/COLOR]) );
}


I'm still figuring out how to add other icon's.
But this should be good for now.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to xQuZe- for this useful post:

howcoolisthis, Kameo, killa skillz, Mrs.Drake, PussayPatrol, xCoD_I3eAsT
03-11-2011, 08:51 PM #20
PussayPatrol
I'm a neat monster...
umm... GoodJob Keep up The Good Work
03-12-2011, 10:26 AM #21
xQuZe-
You talkin to me?
Originally posted by srk74 View Post
xQuZe- U getn Better Hope You Win Prem


Thanks but i don't think so Winky Winky
03-12-2011, 10:29 AM #22
Beta-
< ^ > < ^ >
Originally posted by xQuZe
Thanks but i don't think so Winky Winky


You Deserve lol You Come Out Of No Where And Bust Codings ass lol

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo