01.02.2014, 21:49
(
Последний раз редактировалось Phil_Cutcliffe; 01.02.2014 в 22:26.
)
Having a major brainfart at what to do here... Could any one give me any tips? I know the if(skinid < 1 etc etc line is too long but I need all the skin id's in there. How do I solve this?
EDIT: I think I solved it... Compiled with no errors...
pawn Код:
if(dialogid == 17)
{
if(!response)
{
TogglePlayerControllable(playerid,1);
return 1;
}
if(response)
{
new skinid = strval(inputtext);
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,17,DIALOG_STYLE_INPUT,"Select your Skin ID","Type the ID of the skin you wish to use: ","Select","Cancel");
if(skinid < 1 || skinid > 299 || skinid == 274 || skinid == 275 || skinid == 276 || skinid == 280 || skinid == 281 || skinid == 282 || skinid == 283 || skinid == 288 || skinid == 285 || skinid == 287 || skinid == 163 || skinid == 164 || skinid == 165 || skinid == 166 || skinid == 286 || skinid == 277 || skinid == 278 || skinid == 279 || skinid == 105 || skinid == 106 || skinid == 107 || skinid == 102 || skinid == 103 || skinid == 104 || skinid == 114 || skinid == 115 || skinid == 116 || skinid == 173 || skinid == 174 || skinid == 175 || skinid == 117 || skinid == 118 || skinid == 120 || skinid == 121 || skinid == 122 || skinid == 123)
{
SendClientMessage(playerid, COLOR_RED, "Invalid OR Faction Skin!");
ShowPlayerDialog(playerid,17,DIALOG_STYLE_INPUT,"Select your Skin ID","Type the ID of the skin you wish to use: ","Select","Cancel");
return 1;
}
else
{
SetPlayerSkin(playerid, skinid);
PlayerInfo[playerid][pSkin] = skinid;
SendClientMessage(playerid, COLOR_ORANGE, "Your Skin has been changed!");
TogglePlayerControllable(playerid,1);
GivePlayerCash(playerid, -350);
return 1;
}
}
}
pawn Код:
if(dialogid == 17)
{
if(!response)
{
TogglePlayerControllable(playerid,1);
return 1;
}
if(response)
{
new skinid = strval(inputtext);
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,17,DIALOG_STYLE_INPUT,"Select your Skin ID","Type the ID of the skin you wish to use: ","Select","Cancel");
if(skinid < 1 || skinid > 299 || skinid == 274 || skinid == 275 || skinid == 276 || skinid == 280 || skinid == 281 || skinid == 282 || skinid == 283 || skinid == 288 || skinid == 285 ||
skinid == 287 || skinid == 163 || skinid == 164 || skinid == 165 || skinid == 166 || skinid == 286 || skinid == 277 || skinid == 278 || skinid == 279 || skinid == 105 || skinid == 106 ||
skinid == 107 || skinid == 102 || skinid == 103 || skinid == 104 || skinid == 114 || skinid == 115 || skinid == 116 || skinid == 173 || skinid == 174 || skinid == 175 || skinid == 117 || skinid == 118 || skinid == 120 || skinid == 121 || skinid == 122 || skinid == 123)
{
SendClientMessage(playerid, COLOR_RED, "Invalid OR Faction Skin!");
ShowPlayerDialog(playerid,17,DIALOG_STYLE_INPUT,"Select your Skin ID","Type the ID of the skin you wish to use: ","Select","Cancel");
return 1;
}
else
{
SetPlayerSkin(playerid, skinid);
PlayerInfo[playerid][pSkin] = skinid;
SendClientMessage(playerid, COLOR_ORANGE, "Your Skin has been changed!");
TogglePlayerControllable(playerid,1);
GivePlayerCash(playerid, -350);
return 1;
}
}
}