10.02.2013, 15:48
When I type in the skin ID I want, nothing happens and no money is taken.
pawn Код:
CMD:clothes(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid,1,210.6381,-9.1441,1001.2109))
{
ShowPlayerDialog(playerid,24,1,"Clothes","Type in a skin ID below. (1-299)\nClothing cost $25!","Submit","Cancel");
}
return 1;
}
pawn Код:
if(dialogid==24)
{
if(!response)
if(response)
{
if(pInfo[playerid][Cash]>1)
{
new skin = strval(inputtext);
if(skin < 1 || skin > 299) return ShowPlayerDialog(playerid,24,1,"Clothes","{FF6347}Invalid skin ID!\n{A9C4E4}Type in a skin ID below. (1-299)\nClothing cost $1!","Submit","Cancel");
pInfo[playerid][Cash]--;
GivePlayerMoney(playerid,-1);
SetPlayerSkin(playerid,skin);
pInfo[playerid][Skin]=skin;
}
}
return 1;
}