SA-MP Forums Archive
Help with arrays - 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: Help with arrays (/showthread.php?tid=599635)



Help with arrays - adithegman - 28.01.2016

When I type in the command, it sets the wrong skin, I think it's an array problem

Код:
new FactionLeaderSkin[][3] = {264,265,113};
CMD:makeleader..
{
 ..
                PlayerInfo[id][pSkin] = strlen(FactionLeaderSkin[factionid]); // factionid: 0-Civilian 1-Police 2-Mafia
		SetPlayerSkin(id,strlen(FactionLeaderSkin[factionid]));
 ..
}



Re: Help with arrays - Jefff - 28.01.2016

pawn Код:
new FactionLeaderSkin[] = {264,265,113};

PlayerInfo[id][pSkin] = FactionLeaderSkin[factionid];
SetPlayerSkin(id,PlayerInfo[id][pSkin]);