Is there a quicker way of doing this ?
#1

Im making it so when you do /buyclothes a dialog pops up and what ever skins ID you put in there box your skins changes to that ID


Im doing it like this


Код:
if(dialogid == DIALOG_BUYCLOTHES)
	{
	    if(response)
	    {
	        new clothes = strval(inputtext);
		        if(clothes == 1)
				{
                    SetPlayerSkin(playerid, 1);
    				SaveAccountStats(playerid);
					SendClientMessage(playerid, COLOR_GOLD, "Skin changed");
					}
					else
					{
					if(clothes == 2)
					{
					    SetPlayerSkin(playerid, 2);
    					SaveAccountStats(playerid);
						SendClientMessage(playerid, COLOR_GOLD, "Skin changed");
					}
		}
 }
 }
 }
Is there a quicker way of doing this


Please Help Please
Reply
#2

Are you checking all skins possible in SA world?:O,ok lol.Yes there is a faster way:

pawn Код:
SetPlayerSkin(playerid,clothes);
And for the last time use PAWN tags,please.(IN FORUM,when you paste in the box instead of code and /code use pawn and /pawn please)
Reply
#3

Quote:
Originally Posted by Cjgogo
Посмотреть сообщение
Are you checking all skins possible in SA world?:O,ok lol.Yes there is a faster way:

pawn Код:
SetPlayerSkin(playerid,clothes);
And for the last time use PAWN tags,please.(IN FORUM,when you paste in the box instead of code and /code use pawn and /pawn please)
So would it be something like this


pawn Код:
if(dialogid == DIALOG_BUYCLOTHES)
    {
        if(response)
        {
            new clothes = strval(inputtext);
                if(clothes == 1)
                        if(clothes == 2)
                        if(clothes == 3)
                {
                    SetPlayerSkin(playerid, clothes);
                    SaveAccountStats(playerid);
                    SendClientMessage(playerid, COLOR_GOLD, "Skin changed");
                    }
        }
 }
 }
 }
Reply
#4

I just tried doing it the way i just aid but it did not work


Was it meant to work ?
Reply
#5

Use this:
Код:
if( dialogid == DIALOG_BUYCLOTHES )
{
	if( !response )
		return 1;

	SetPlayerSkin( playerid, strval( inputtext ) );
	SaveAccountStats( playerid );
	SendClientMessage( playerid, COLOR_GOLD, "Skin changed" );
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)