• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Skins won't get changed.
#1
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];
? ? ? ? ? ? ?}

  Reply
#2
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?
  Reply
#3
(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);
  Reply
#4
(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]);
  Reply
#5
(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.
  Reply


Forum Jump: