SA-MP Forums Archive
Bug report - Skin - 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: Bug report - Skin (/showthread.php?tid=68033)



Bug report - Skin - MenaceX^ - 06.03.2009

Ok, so I don't know what happened. I didn't touch any code of mine or something. Simply SetPlayerSkin function doesn't work.
These are two of my commands, both don't work at all. It does send the messages. Everything is correct but skin, it doesn't set it.
I tried once with strval(cmd) without setting any shorter varieble, then I tried with a shorter varieble
pawn Код:
new skin=strval(cmd);
pawn Код:
if(!strcmp(cmd,"/skin",true))
    {
        if(!pInfo[playerid][Admin]) return aerror(playerid);
        cmd=strtok(cmdtext,idx);
        if(!strlen(cmd)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /skin [skinid]");
        return SetPlayerSkin(playerid,strval(cmd));
    }
  if(!strcmp(cmd,"/setskin",true))
  {
        if(!pInfo[playerid][Admin]) return aerror(playerid);
        cmd=strtok(cmdtext,idx);
        if(!strlen(cmd)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /setskin [playername/id] [skinid]");
        id=ReturnUser(cmd);
        if(!IsPlayerConnected(id)) return error(playerid);
        cmd=strtok(cmdtext,idx);
        if(!strlen(cmd)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /setskin [playername/id] [skinid]");
        new skin=strval(cmd);
        SetPlayerSkin(id,skin);
        format(string,sizeof(string),"Admin %s has changed your skin to %d.",PlayerName(playerid),skin);
        SendClientMessage(id,COLOR_RED,string);
        format(string,sizeof(string),"You've changed %s's skin to %d.",PlayerName(id),skin);
        return SendClientMessage(playerid,COLOR_RED,string);
    }



Re: Bug report - Skin - ICECOLDKILLAK8 - 06.03.2009

SetPlayerSkin works fine


Re: Bug report - Skin - MenaceX^ - 06.03.2009

No. It doesn't.


Re: Bug report - Skin - kaisersouse - 06.03.2009

Quote:
Originally Posted by MenaceX^
No. It doesn't.
Umm it very much does work just fine. It will NOT keep the skin on respawn if you are using YSI..that much I do know.


Re: Bug report - Skin - 90NINE - 06.03.2009

I've never had ANY problems with SetPlayerSkin from 0.2 onward. I use it with OnPlayerRequestClass and it works fine.


Re: Bug report - Skin - RoBo - 06.03.2009

I use SetPlayerSkin under OnPlayerSpawn and i've yet to find anything wrong with it.


Re: Bug report - Skin - Norn - 07.03.2009

Function works perfectly, you can't blame SA-MP built in functions when your scripting abilities aren't as good as you thought.


Re: Bug report - Skin - beckzy - 07.03.2009

This should be moved to scripting discussion


Re: Bug report - Skin - MenaceX^ - 16.03.2009

Sorry Seif but it doesn't matter, the problem is solved and I hate to use tmp, I use cmd instead.. It doesn't really matter instead of less MB for the AMX.
Btw, It's only me or someone removed around 150 messages of you?, You had more messages than 5500.