Bug report - Skin
#1

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);
    }
Reply
#2

SetPlayerSkin works fine
Reply
#3

No. It doesn't.
Reply
#4

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.
Reply
#5

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

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

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

This should be moved to scripting discussion
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)