PDA

View Full Version : Team look the model as...



Loveboy
6th October 2013, 10:49
Hello Guys!
Maybe you know it, if you are in the team allies, you will see the model as a panzer.
And if you are in the team axis, you will see the model as a car.
Is it possible to make it in cod2? The model is placed as example (131,372,0), but the other teams say it as another model.

serthy
6th October 2013, 11:23
Short: yes, possible



A bit longer:


function gamelogic
while game is running
game waittill player joined team
updateVisibility
endloop
endfunction

function updateVisibility
model1 hide
model2 hide

foreach player in players
if player team == team1
model1 showTo( player )
else
model2 showTo( player )
endif
endloop
endfunction

showTo() shows the model to the inputplayer

Loveboy
6th October 2013, 11:59
this is nice! thank you serthy!