Bugged skin change?
#1

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
Reply
#2

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);
}
Reply
#3

Not working. I'll try delaying it.
Reply
#4

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.
Reply
#5

Did so. Still the same.
Reply
#6

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.
Reply
#7

Код:
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); }
	}
Reply
#8

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



Sorry for bad english
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)