open.mp forum
[Pawn] Skins won't get changed. - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] Skins won't get changed. (/showthread.php?tid=1838)



Skins won't get changed. - Axitz - 2021-04-05

Hi,

I'm not sure whats wrong with it. I tried multiple ways to fix this problem but it keep sending me same messages.
It compiled without errors and warnings.

Whenever this system trigged on my server, it keep changing the skin to CJ skins not the one I set in [FSkins1].

PHP Code:
if(PlayerInfo[playerid][playerteam] == faction1 || PlayerInfo[playerid][playerteam] == faction2)
{
? ? ? ? ? ? ?new 
teami maskid[playerid];
? ? ? ? ? ? 
SetPlayerTeam(playeridteami);
? ? ? ? ? ? 
playerwarinv[playerid] = 1;
? ? ? ? ? ? 
inv_timer[playerid] = SetTimerEx("killinv"179000false"i"playerid);
? ? ? ? ? ? if(
iTier != FactionInfo[playerid][FSkin1])
? ? ? ? ? ? {
? ? ? ? ? ? ? ? ?
//new warskin = FactionInfo[playerid][FSkin1];
                 
SendClientError(playerid"Your skin has been changed because you don't have current faction ones.");
? ? ? ? ? ? ? ? ?
SetPlayerSkin(playeridFactionInfo[playerid][FSkin1]);
? ? ? ? ? ? ? ? ?
PlayerInfo[playerid][Skin] = FactionInfo[playerid][FSkin1];
? ? ? ? ? ? ?}




RE: Skins won't get changed. - Bakr - 2021-04-05

Are you receiving the message "Your skin has been changed..."?



Does FactionInfo[playerid][FSkin1] actually hold the correct skin ID you are trying to set?

Code:
SendClientError(playerid, "Your skin has been changed because you don't have current faction ones.");

SetPlayerSkin(playerid, FactionInfo[playerid][FSkin1]);

PlayerInfo[playerid][Skin] = FactionInfo[playerid][FSkin1];

printf("Skin set to ID %i", FactionInfo[playerid][FSkin1]);



Looking at how you interact with PlayerInfo and FactionInfo array, I would suspect you are actually trying to set the skin from the value stored in

Code:
FactionInfo[PlayerInfo[playerid][playerteam]][FSkin1]



What is iTier?


RE: Skins won't get changed. - Axitz - 2021-04-05

(2021-04-05, 05:51 AM)Bakr Wrote: Are you receiving the message "Your skin has been changed..."?



Does FactionInfo[playerid][FSkin1] actually hold the correct skin ID you are trying to set?

Code:
SendClientError(playerid, "Your skin has been changed because you don't have current faction ones.");

SetPlayerSkin(playerid, FactionInfo[playerid][FSkin1]);

PlayerInfo[playerid][Skin] = FactionInfo[playerid][FSkin1];

printf("Skin set to ID %i", FactionInfo[playerid][FSkin1]);



Looking at how you interact with PlayerInfo and FactionInfo array, I would suspect you are actually trying to set the skin from the value stored in

Code:
FactionInfo[PlayerInfo[playerid][playerteam]][FSkin1]



What is iTier?



Are you receiving the message "Your skin has been changed..."?

- Yes, I see them but it switched my skin to CJ not in FSkin1.



Looking at how you interact with PlayerInfo and FactionInfo array, I would suspect you are actually trying to set the skin from the value stored in

- Correct.



What is iTier?

-?new iTier = GetPlayerSkin(playerid);


RE: Skins won't get changed. - Bakr - 2021-04-05

(2021-04-05, 05:55 AM)Axitz Wrote: Looking at how you interact with PlayerInfo and FactionInfo array, I would suspect you are actually trying to set the skin from the value stored in
- Correct.

Code:
SetPlayerSkin(playerid, FactionInfo[PlayerInfo[playerid][playerteam]][FSkin1]);



RE: Skins won't get changed. - Axitz - 2021-04-05

(2021-04-05, 06:01 AM)Bakr Wrote:
(2021-04-05, 05:55 AM)Axitz Wrote: Looking at how you interact with PlayerInfo and FactionInfo array, I would suspect you are actually trying to set the skin from the value stored in

- Correct.



Code:
SetPlayerSkin(playerid, FactionInfo[PlayerInfo[playerid][playerteam]][FSkin1]);



it worked. thank you so much.