/skin Command
#1

Hey Guys , Can anyone give me /skin command like /skin 1-299

Thanks .
Reply
#2

Here you go mate:
pawn Код:
COMMAND:skin(playerid, params[])
{
    new skinid;
    if(!sscanf(params, "i",skinid))
    {
        if(skinid < 300)
        {
            SetPlayerSkin(playerid, skinid);
            SendClientMessage(playerid, COLOR_WHITE," You have new skin!! Wooho!");
        }
        else return SendClientMessage(playerid, COLOR_LIGHTRED,"Please use skin ID's between 0 and 299!");
    }
    else return SendClientMessage(playerid, COLOR_WHITE,"Usage: /skin [ID (0-299)]");
    return 1;
}
This is rough example. You should code it a little bit more if you want to solve all the bugs that comes with that command.
Reply
#3

Thanks for being impatient.

http://forum.sa-mp.com/showpost.php?...&postcount=518

I already made your command for you, but you had to go and make two separate posts.

@xRyder - Your command has a redundant usage of sscanf, you can just use isnull and strval as you're only dealing with one integer. Furthermore, invalid skin IDs can be sent through your command.
Reply
#4

Quote:
Originally Posted by Calg00ne
Посмотреть сообщение
Thanks for being impatient.

http://forum.sa-mp.com/showpost.php?...&postcount=518

I already made your command for you, but you had to go and make two separate posts.

@xRyder - Your command has a redundant usage of sscanf, you can just use isnull and strval as you're only dealing with one integer. Furthermore, invalid skin IDs can be sent through your command.
Yeah, I know for all of these bugs. That was just rough example. I told him that it can cause bugs:
Quote:
Originally Posted by xRyder
Посмотреть сообщение
This is rough example. You should code it a little bit more if you want to solve all the bugs that comes with that command.
Anyways, don't blame me, I just woke up and a can't even see my monitor clearly.
Reply
#5

I'm not blaming you, I'm providing constructive criticism on how you can improve that command, seeing as you added a portion of redundant code.
Reply
#6

Thanks Guys
Reply
#7

Sorry For The Duoble Post , But anyone have the /skin command without "sscanf" ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)