SA-MP Forums Archive
Some help with skins. - 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: Some help with skins. (/showthread.php?tid=582915)



Some help with skins. - GabiXx - 24.07.2015

Can someone show me a command to change skin, like /skin [x].
I try but i make something like /skin1, /skin2, you know...I want all skin in 1 command.


AW: Some help with skins. - Mencent - 24.07.2015

Hello!

Can you send us your example command?
So that I see which command-processor you used, and so on.

- Mencent


Re: Some help with skins. - Fancy - 24.07.2015

Dont forget +Rep

Код:
CMD:skin(playerid,params[])
{
    new skinid;
    if(skinid < 0 || skinid > 311) GameTextForPlayer(playerid,"~g~/skin~n~~w~(0-311)",4500,3);
    else
    {
        SetPlayerSkin(playerid, skinid);
    }
    return 1;
}



AW: Some help with skins. - Mencent - 24.07.2015

@Fancy:
That doesn't work.
In your code skinid is always 0.


@GabiXx:
Use sscanf.
https://sampforum.blast.hk/showthread.php?tid=570927

PHP код:
CMD:skin(playerid,params[])
{
    new 
skinid;
    if(
sscanf(params,"i",skinid))return SendClientMessage(playerid,-1,"/skin [ID]");
    if(
skinid || skinid 311)return SendClientMessage(playerid,-1,"Invalid SkinID");
    
SetPlayerSkin(playerid,skinid);
    return 
1;

If you use another command-processor you can change this.

- Mencent


Re: Some help with skins. - GabiXx - 24.07.2015

Mencet, when is use /skin and an id, i get message "/skin [ID]" but i don't get the skin.


Re : Some help with skins. - Terrorizt - 24.07.2015

Are you sure that you wrote something like /skin 1 ??
Don't forget there is a space between /skin and 1


Re: Some help with skins. - GabiXx - 25.07.2015

Yes, i wrote correct.
I have just a register system on my server, is this a problem?
I need something to work?


AW: Some help with skins. - Mencent - 25.07.2015

Can you send me your current "/skin" command?


- Mencent


Re : Some help with skins. - Terrorizt - 25.07.2015

Look at this tutorial maybe it helps you:
https://sampforum.blast.hk/showthread.php?tid=473769


Re: Some help with skins. - GabiXx - 25.07.2015

PHP код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
CMD:skin(playerid,skinid,params[])
{
    new 
skinid;
    if(
sscanf(params,"i",skinid))return SendClientMessage(playerid,-1,"/skin [ID]");
    if(
skinid || skinid 311)return SendClientMessage(playerid,-1,"Invalid SkinID");
    
SetPlayerSkin(playerid,skinid);
    return 
1;

Is that you make.