SA-MP Forums Archive
Bugged skin change? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bugged skin change? (/showthread.php?tid=306398)



Bugged skin change? - Seven_of_Nine - 26.12.2011

Hello,

My problem is simple. I've got a disguise command, it's working fine and stuff, but the problem is the following:
Код:
	if(newkeys & KEY_FIRE && GetPVarInt(playerid,"disguised") == 1) {
	    if(IsPlayerTeam(playerid,"white")) SetPlayerSkin(playerid,SPY_WHITE);
	    if(IsPlayerTeam(playerid,"black")) SetPlayerSkin(playerid,SPY_BLACK);
	}
So, when the skin changes back, the player just... freezes. It's like some buggy TogglePlayerControllable...

Any solution for this?

Thx


Re: Bugged skin change? - Nixon_West - 26.12.2011

Why not do so as in the example?

if(newkeys & KEY_FIRE && GetPVarInt(playerid,"disguised") == 1) {
if(IsPlayerTeam(playerid,"white")) SetPlayerSkin(playerid,SPY_WHITE);TogglePlayerCont rollable(playerid,1);
if(IsPlayerTeam(playerid,"black")) SetPlayerSkin(playerid,SPY_BLACK);TogglePlayerCont rollable(playerid,1);
}


Re: Bugged skin change? - Seven_of_Nine - 26.12.2011

Not working. I'll try delaying it.


Re: Bugged skin change? - Nixon_West - 26.12.2011

Quote:
Originally Posted by Seven_of_Nine
Посмотреть сообщение
Not working. I'll try delaying it.
make a separate command defrost and check it after changing the skin.


Re: Bugged skin change? - Seven_of_Nine - 26.12.2011

Did so. Still the same.


Re: Bugged skin change? - Nixon_West - 26.12.2011

Quote:
Originally Posted by Seven_of_Nine
Посмотреть сообщение
Did so. Still the same.
then I think worth upgrade inkluda.
Even if the defrost function is broken.


Re: Bugged skin change? - Seven_of_Nine - 26.12.2011

Код:
forward DeFreezeDi(playerid);
public DeFreezeDi(playerid) {
	TogglePlayerControllable(playerid,1);
	return 1;
}

	if(newkeys & KEY_FIRE && GetPVarInt(playerid,"disguised") == 1) {
	    if(IsPlayerTeam(playerid,"white")) { SetPlayerSkin(playerid,SPY_WHITE); SetTimerEx("DeFreezeDi",1000,false,"i",playerid); }
	    if(IsPlayerTeam(playerid,"black")) { SetPlayerSkin(playerid,SPY_BLACK); SetTimerEx("DeFreezeDi",1000,false,"i",playerid); }
	}



Re: Bugged skin change? - Nixon_West - 26.12.2011

Why do you use a timer?
Can in fact function to change the skin to enter this



Sorry for bad english