SA-MP Forums Archive
Skin 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)
+--- Thread: Skin HElp (/showthread.php?tid=614104)



Skin HElp - b0b - 04.08.2016

PHP код:
COMMAND:mskin(playeridparams[])
{
    new 
playerbstring[128], skinid;
    if(
Logged[playerid] == true)
    {
        if(
PlayerInfo[playerid][pAdmin] >= 2)
        {
            if(!
sscanf(params"ds"playerbskinid))
            {
                if(
IsPlayerConnected(playerb))
                {
                    if(
skinid <= 299 && skinid >= 1)
                    {
                        
format(stringsizeof(string), "ADMIN: %s seadistas %s skinni[Skin: %d]"RPName(playerid), RPName(playerb), skinid);
                        
SendAdminMessage(COLOR_YELLOWstring);
                        
format(stringsizeof(string), "Administraator %s seadistas su skinni, Skin: %d"RPName(playerid), skinid);
                        
SendClientMessage(playerbCOLOR_WHITEstring);
                        
SetPlayerSkin(playerbskinid);
                    }
                    else 
SendClientMessage(playeridCOLOR_RED"Skin ei saa olla alla 1 voi suurem kui 299");
                }
                else 
SendClientMessage(playeridV_SININE"Sellist mangijat ei leitud");
            }
            else 
SendClientMessage(playeridV_SININE"{3BB9FF}KASUTA: {FFFFFF}/teeskin [id] [Skinid]");
        }
        else 
SendClientMessage(playeridCOLOR_GRAD1"Sul pole хigusi, et seda commandi kasutada.");
    }
    else 
SendClientMessage(playeridV_SININE"Sa ei ole veel sisse loginud");
    return 
1;

This ise the code.
And Pic


Like if i but 299 it set random skin why?


Re: Skin HElp - oMa37 - 04.08.2016

PHP код:
if(!sscanf(params"ds"playerbskinid)) 
to

PHP код:
if(sscanf(params"ui"playerbskinid)) 



Re: Skin HElp - b0b - 04.08.2016

Quote:
Originally Posted by oMa37
Посмотреть сообщение
PHP код:
if(!sscanf(params"ds"playerbskinid)) 
to

PHP код:
if(sscanf(params"ui"playerbskinid)) 
Yep. but now its say "player not foud" Why?


Re: Skin HElp - Logic_ - 04.08.2016

If you are using 0.3.7, then there are skins from 0 to 311.


Re: Skin HElp - b0b - 04.08.2016

Quote:
Originally Posted by TopShooter
Посмотреть сообщение
Use this -,-

PHP код:
if(sscanf(params"id"playerbskinid)) 

Ty its work :3


Re: Skin HElp - oMa37 - 04.08.2016

Quote:
Originally Posted by TopShooter
Посмотреть сообщение
It's not going to work ._. he has to put id, not ui neither ds.

This one below should work
PHP код:
if(sscanf(params"id"playerbskinid)) 
The way I shared works fine for me by the way.


Re: Skin HElp - Vince - 04.08.2016

If "u" does not work correctly then sscanf isn't installed correctly. Also "d" and "i" are interchangeable.


Re: Skin HElp - Deadpoop - 04.08.2016

Quote:
Originally Posted by TopShooter
Посмотреть сообщение
It's not going to work ._. he has to put id, not ui neither ds.

This one below should work
PHP код:
if(sscanf(params"id"playerbskinid)) 
Actually ui should work!

u- username/id
i-integer

so I don't see any good reason why it wouldn't work