GetPlayerSkin? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GetPlayerSkin? (
/showthread.php?tid=154182)
GetPlayerSkin? -
MWF2 - 12.06.2010
I'm having a problem setting spawn locations with the skin.....
How can I make this work?
I'm getting an error:
error 033: array must be indexed (variable "skin")
pawn Код:
new skin[MAX_PLAYERS];
skin[playerid] = GetPlayerSkin(playerid);
if(skin >= 19 && skin <= 64) {
new rnd;
SetPlayerFacingAngle(playerid, 88.6658);
SetTimerEx("DialogTimeout", 60000, false, "i", playerid);
rnd = random(sizeof (SpawnPoints));
SetPlayerPos(playerid, SpawnPoints[rnd][0], SpawnPoints[rnd][1], SpawnPoints[rnd][2]);
CanChooseSkill[playerid] = 1;
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, 0x1E90FFAA, "Use /skill to pick a skill. If you don't pick one, you'll be given one automatically.");
SendClientMessage(playerid, 0x1E90FFAA, "You have 60 seconds to pick a skill.");
}
Re: GetPlayerSkin? -
Dark_Kostas - 12.06.2010
change the
if(skin >= 19 && skin <= 64)
to
if(skin[playerid] >= 19 && skin[playerid] <= 64)
EDIT:
It would be better to change
pawn Код:
new skin[MAX_PLAYERS];
skin[playerid] = GetPlayerSkin(playerid);
if(skin >= 19 && skin <= 64) {
TO
pawn Код:
//remove the new skin and skin[playerid]=
if(GetPlayerSkin(playerid) >= 19 && GetPlayerSkin(playerid) <= 64) {
Re: GetPlayerSkin? -
MWF2 - 12.06.2010
Thanks.