Jump to content
Sign in to follow this  
KraaZe

Using setObjectTexture on respawn to set skin?

Recommended Posts

Hey guys, right now in my mission.sqm I have the following setup for each of my Cop

position[]={5907.3682,83.082619,11892.562};
azimut=65.167801;
id=128;
side="WEST";
vehicle="Soldier_Crew_PMC";
player="PLAY CDG";
leader=1;
skill=0.60000002;
text="Cop1";
init="removeallweapons this;this setObjectTexture [0,""images\policetest.paa""];";
description="Cop1";

Now what this does is makes the player spawn with that custom texture which basically says POLICE. Ya know, for role play purposes.

The issue I'm having is that the skin goes away and the texture is the default for Soldier_Crew_PMC although if I am to abort and login again it will go to the police skin.

Ideas?

Share this post


Link to post
Share on other sites

Not sure i get the issue right here.

That texture goes away when you respawn?

In that case, you might wanna use something like that:

init.sqf

 _index = player addMPEventHandler ["MPRespawn", {Null = _this execVM "onrespawn.sqf";}];

onrespawn.sqf

cop = _this select 1;
cop setInit "removeallweapons this; this setObjectTexture [0,""images\policetest.paa""];";
ProcessInitCommands;

Not tested, you get the idea.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×