Some help with skins.
#1

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

Hello!

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

- Mencent
Reply
#3

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

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

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

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

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

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


- Mencent
Reply
#9

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

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


Forum Jump:


Users browsing this thread: 2 Guest(s)