08.06.2013, 08:15
Hello,
I am making a Duty clothes system (later on also for stores), but when I press next Skin textdraw it only works once and same with previous...
I am making a Duty clothes system (later on also for stores), but when I press next Skin textdraw it only works once and same with previous...
pawn Код:
if(Player[playerid][SelectingClothes] == 1)
{
if(Player[playerid][SelectingClothesType] == 1)
{
new CurSkin = 0;
if(clickedid == NSkin)
{
if(CurSkin == 0)
{
SetPlayerSkin(playerid, CopSkins[1][0]);
CurSkin = 1;
}
else if(CurSkin == 1)
{
SetPlayerSkin(playerid, CopSkins[2][0]);
CurSkin = 2;
}
else if(CurSkin == 2)
{
SetPlayerSkin(playerid, CopSkins[3][0]);
CurSkin = 3;
}
else if(CurSkin == 3)
{
SetPlayerSkin(playerid, CopSkins[4][0]);
CurSkin = 4;
}
else if(CurSkin == 4)
{
SetPlayerSkin(playerid, CopSkins[5][0]);
CurSkin = 5;
}
else if(CurSkin == 5)
{
SetPlayerSkin(playerid, CopSkins[6][0]);
CurSkin = 6;
}
else if(CurSkin == 6)
{
SetPlayerSkin(playerid, CopSkins[7][0]);
CurSkin = 7;
}
else if(CurSkin == 7)
{
SetPlayerSkin(playerid, CopSkins[8][0]);
CurSkin = 8;
}
else if(CurSkin == 8)
{
SetPlayerSkin(playerid, CopSkins[9][0]);
CurSkin = 9;
}
else if(CurSkin == 9)
{
SetPlayerSkin(playerid, CopSkins[0][0]);
CurSkin = 0;
}
}
if(clickedid == PSkin)
{
if(CurSkin == 0)
{
SetPlayerSkin(playerid, CopSkins[9][0]);
CurSkin = 9;
}
else if(CurSkin == 1)
{
SetPlayerSkin(playerid, CopSkins[0][0]);
CurSkin = 0;
}
else if(CurSkin == 2)
{
SetPlayerSkin(playerid, CopSkins[1][0]);
CurSkin = 1;
}
else if(CurSkin == 3)
{
SetPlayerSkin(playerid, CopSkins[2][0]);
CurSkin = 2;
}
else if(CurSkin == 4)
{
SetPlayerSkin(playerid, CopSkins[3][0]);
CurSkin = 3;
}
else if(CurSkin == 5)
{
SetPlayerSkin(playerid, CopSkins[4][0]);
CurSkin = 4;
}
else if(CurSkin == 6)
{
SetPlayerSkin(playerid, CopSkins[5][0]);
CurSkin = 5;
}
else if(CurSkin == 7)
{
SetPlayerSkin(playerid, CopSkins[6][0]);
CurSkin = 6;
}
else if(CurSkin == 8)
{
SetPlayerSkin(playerid, CopSkins[7][0]);
CurSkin = 7;
}
else if(CurSkin == 9)
{
SetPlayerSkin(playerid, CopSkins[8][0]);
CurSkin = 8;
}
}
if(clickedid == SSkin)
{
Player[playerid][DutyClothes] = CopSkins[CurSkin][0];
SetPlayerPos(playerid, Player[playerid][LastX], Player[playerid][LastY], Player[playerid][LastZ]);
SetPlayerFacingAngle(playerid, Player[playerid][LastA]);
SetPlayerInterior(playerid, Player[playerid][LastInt]);
SetPlayerVirtualWorld(playerid, Player[playerid][LastWorld]);
SetPlayerSkin(playerid, Player[playerid][LastSkin]);
Player[playerid][SelectingClothesType] = 0;
Player[playerid][SelectingClothes] = 0;
SCM(playerid, ADMINBLUE, "Duty Clothes changed!");
SavePlayerData(playerid);
CancelSelectTextDraw(playerid);
SetCameraBehindPlayer(playerid);
TextDrawHideForPlayer(playerid, Text:NSkin);
TextDrawHideForPlayer(playerid, Text:PSkin);
TextDrawHideForPlayer(playerid, Text:SSkin);
TextDrawHideForPlayer(playerid, Text:CSkin);
}
if(clickedid == CSkin)
{
SetPlayerPos(playerid, Player[playerid][LastX], Player[playerid][LastY], Player[playerid][LastZ]);
SetPlayerFacingAngle(playerid, Player[playerid][LastA]);
SetPlayerInterior(playerid, Player[playerid][LastInt]);
SetPlayerVirtualWorld(playerid, Player[playerid][LastWorld]);
SetPlayerSkin(playerid, Player[playerid][LastSkin]);
Player[playerid][SelectingClothesType] = 0;
Player[playerid][SelectingClothes] = 0;
CancelSelectTextDraw(playerid);
SetCameraBehindPlayer(playerid);
TextDrawHideForPlayer(playerid, Text:NSkin);
TextDrawHideForPlayer(playerid, Text:PSkin);
TextDrawHideForPlayer(playerid, Text:SSkin);
TextDrawHideForPlayer(playerid, Text:CSkin);
}
}