Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Skins won't get changed.

 
  • 0 Vote(s) - 0 Average
Pawn Skins won't get changed.
Axitz
Offline

Burgershot Member
Posts: 24
Threads: 11
Joined: Apr 2021
Reputation: 0
Location: Malaysia
#1
2021-04-05, 05:37 AM (This post was last modified: 2021-04-05, 05:39 AM by Axitz.)
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(playerid, teami);
            playerwarinv[playerid] = 1;
            inv_timer[playerid] = SetTimerEx("killinv", 179000, false, "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(playerid, FactionInfo[playerid][FSkin1]);
                 PlayerInfo[playerid][Skin] = FactionInfo[playerid][FSkin1];
             }
} 
Bakr
Offline

Burgershot Member
Posts: 14
Threads: 2
Joined: Oct 2020
Reputation: 6
Location: United States
#2
2021-04-05, 05:51 AM
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?
Axitz
Offline

Burgershot Member
Posts: 24
Threads: 11
Joined: Apr 2021
Reputation: 0
Location: Malaysia
#3
2021-04-05, 05:55 AM
(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.

[font=Tahoma, Verdana, Arial, sans-serif]What is iTier?[/font]
[font=Tahoma, Verdana, Arial, sans-serif]- new iTier = GetPlayerSkin(playerid);[/font]
Bakr
Offline

Burgershot Member
Posts: 14
Threads: 2
Joined: Oct 2020
Reputation: 6
Location: United States
#4
2021-04-05, 06:01 AM (This post was last modified: 2021-04-05, 06:02 AM by Bakr.)
(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]);
Axitz
Offline

Burgershot Member
Posts: 24
Threads: 11
Joined: Apr 2021
Reputation: 0
Location: Malaysia
#5
2021-04-05, 06:09 AM
(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.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode