PDA

View Full Version : [HELP] Pawno Library Has Stopped


KONTROWKEN
27/11/2016, 11:48 AM
http://i.hizliresim.com/o021zQ.jpg

CODE:

/////////Skin
timer KeyCheck[200](playerid)
{
new keys, ud, lr;
GetPlayerKeys(playerid, keys, ud, lr);
if(skinMenuSelectionScreen[playerid] == true)
{
if(lr > 0) // KEY_RIGHT
{
if(GetPlayerSkin(playerid) == 299) SetPlayerSkin(playerid, 1);
else SetPlayerSkin(playerid, GetPlayerSkin(playerid)+1);
//PlayerPlaySound(playerid, 1083, -1, -1, -1);

new iCurSkin = GetPlayerSkin(playerid);
new iPrevSkin = iCurSkin-1;
new iNextSkin = iCurSkin+1;

new szTmpString[4];
if(iPrevSkin != 0)
{
format(szTmpString, sizeof(szTmpString), "%d", iPrevSkin);
TextDrawSetString(PrevSkinTD[playerid], szTmpString);
}
else TextDrawSetString(PrevSkinTD[playerid], "299");

format(szTmpString, sizeof(szTmpString), "%d", iCurSkin);
TextDrawSetString(CurSkinTD[playerid], szTmpString);

if(iNextSkin != 300)
{
format(szTmpString, sizeof(szTmpString), "%d", iNextSkin);
TextDrawSetString(NextSkinTD[playerid], szTmpString);
}
else TextDrawSetString(NextSkinTD[playerid], "1");
}
else if(lr < 0) // KEY_LEFT
{
if(GetPlayerSkin(playerid) == 1) SetPlayerSkin(playerid, 299);
else SetPlayerSkin(playerid, GetPlayerSkin(playerid)-1);
//PlayerPlaySound(playerid, 1083, -1, -1, -1);

new iCurSkin = GetPlayerSkin(playerid);
new iPrevSkin = iCurSkin-1;
new iNextSkin = iCurSkin+1;

new szTmpString[4];
if(iPrevSkin != 0)
{
format(szTmpString, sizeof(szTmpString), "%d", iPrevSkin);
TextDrawSetString(PrevSkinTD[playerid], szTmpString);
}
else TextDrawSetString(PrevSkinTD[playerid], "299");

format(szTmpString, sizeof(szTmpString), "%d", iCurSkin);
TextDrawSetString(CurSkinTD[playerid], szTmpString);

if(iNextSkin != 300)
{
format(szTmpString, sizeof(szTmpString), "%d", iNextSkin);
TextDrawSetString(NextSkinTD[playerid], szTmpString);
}
else TextDrawSetString(NextSkinTD[playerid], "1");
}
}
}