Skin HElp
#1

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

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

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

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?
Reply
#4

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

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

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

Ty its work :3
Reply
#6

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)