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-10-2011, 03:45 PM #2
wowaka
Former Staff
I hate being out of thanks and I can't rep on my phone! No
03-10-2011, 03:47 PM #3
xQuZe-
You talkin to me?
Originally posted by julianportman View Post
I hate being out of thanks and I can't rep on my phone! No


Smile
There are more days/ways. Winky Winky
03-10-2011, 03:50 PM #4
247Yamato
< ^ > < ^ >
I made this code for the zombie mod that I am going to release in 2 days, you can give other icons, look there


    	block.headIcon = newHudElem();
block.headIcon.x = block.origin[0];
block.headIcon.y = block.origin[1];
block.headIcon.z = block.origin[2] + 50;
block.headIcon.alpha = 0.85;
block.headIcon setShader( "cardicon_moon", 2,2 );
block.headIcon setWaypoint( true, true, false );

The following user thanked 247Yamato for this useful post:

xQuZe-
03-10-2011, 04:01 PM #5
xQuZe-
You talkin to me?
Originally posted by 247Yamato View Post
I made this code for the zombie mod that I am going to release in 2 days, you can give other icons, look there


    	block.headIcon = newHudElem();
block.headIcon.x = block.origin[0];
block.headIcon.y = block.origin[1];
block.headIcon.z = block.origin[2] + 50;
block.headIcon.alpha = 0.85;
block.headIcon setShader( "cardicon_moon", 2,2 );
block.headIcon setWaypoint( true, true, false );


How would you thread that on ps3/xbox?
03-10-2011, 04:30 PM #6
247Yamato
< ^ > < ^ >
Originally posted by xQuZe
How would you thread that on ps3/xbox?


                  block = spawn( "script_model", (self.origin+(0,-200,10)) );
block setModel("com_plasticcase_friendly");
block.headIcon = newHudElem();
block.headIcon.x = block.origin[0];
block.headIcon.y = block.origin[1];
block.headIcon.z = block.origin[2] + 50;
block.headIcon.alpha = 0.85;
block.headIcon setShader( "cardicon_moon", 2,2 );
block.headIcon setWaypoint( true, true, false );


???? :p, super easy
03-10-2011, 04:36 PM #7
xQuZe-
You talkin to me?
Originally posted by 247Yamato View Post
                  block = spawn( "script_model", (self.origin+(0,-200,10)) );
block setModel("com_plasticcase_friendly");
block.headIcon = newHudElem();
block.headIcon.x = block.origin[0];
block.headIcon.y = block.origin[1];
block.headIcon.z = block.origin[2] + 50;
block.headIcon.alpha = 0.85;
block.headIcon setShader( "cardicon_moon", 2,2 );
block.headIcon setWaypoint( true, true, false );


???? :p, super easy


Wow ya lol, thx
03-10-2011, 04:36 PM #8
Beta-
< ^ > < ^ >
Cool This Can Be Cool On Zombi Lol Easier to tell
03-11-2011, 06:53 AM #9
xQuZe-
You talkin to me?
Originally posted by 247Yamato View Post
                  block = spawn( "script_model", (self.origin+(0,-200,10)) );
block setModel("com_plasticcase_friendly");
block.headIcon = newHudElem();
block.headIcon.x = block.origin[0];
block.headIcon.y = block.origin[1];
block.headIcon.z = block.origin[2] + 50;
block.headIcon.alpha = 0.85;
block.headIcon setShader( "cardicon_moon", 2,2 );
block.headIcon setWaypoint( true, true, false );


???? :p, super easy


It doesn't spawn lol?
03-11-2011, 10:30 AM #10
Woof
...hmm
Originally posted by xQuZe
It doesn't spawn lol?

try this... then thanks me Happy
    Block maps\mp\killstreaks\_airdrop::crateSetupForUse( "Press ^3[{+usereload}]^7 for ???","all", maps\mp\killstreaks\_killstreaks::getKillstreakCrateIcon( "nuke" ) );

maybe add as optimized version ?... very optimized lool
    Block maps\mp\killstreaks\_airdrop::crateSetupForUse( [COLOR="Red"]hintString, mode, icon [/COLOR]);

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo