SA-MP Forums Archive
Help. - 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: Help. (/showthread.php?tid=259418)



Help. - Janek17 - 04.06.2011

Hey how i make a simple skin command!
Like tihis when player write /skin then he see /skin [SkinID].

Any ideas?



Re: Help. - IvancheBG - 04.06.2011

look this

Код:
if(strcmp(cmd, "/skin", true) == 0)
    {
        new tmp[256];
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, 0xAA3333AA, "Usage: /skin [skinid]");
            return 1;
        }
        new skin;
        skin = strval(tmp);
        new string[128];
        format(string, sizeof(string), "You change your skin to this skin ID: %d", skin);
        SendClientMessage(playerid, 0xFFFF00AA, string);
        SetPlayerSkin(playerid, skin);
        return 1;
	}



Re: Help. - Janek17 - 04.06.2011

Ok tnks.


Re: Help. - IvancheBG - 04.06.2011

did it work