OnPlayerKeyState change problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerKeyState change problem (
/showthread.php?tid=422781)
OnPlayerKeyState change problem -
PaulDinam - 15.03.2013
It doesn't work and I don't know why.
pawn Код:
if(PRESSED(KEY_LEFT) && GetIntVar(playerid, "BrowsingSkins") == 1)
{
if(GetIntVar(playerid, "SkinBuying") == 1) return 1;
SetPlayerSkin(playerid, GetIntVar(playerid, "SkinBuying")+1);
SetIntVar(playerid, "SkinBuying", GetIntVar(playerid, "SkinBuying")+1);
}
if(PRESSED(KEY_RIGHT) && GetIntVar(playerid, "BrowsingSkins") == 1)
{
if(GetIntVar(playerid, "SkinBuying") == 299) return 1;
SetPlayerSkin(playerid, GetIntVar(playerid, "SkinBuying")-1);
SetIntVar(playerid, "SkinBuying", GetIntVar(playerid, "SkinBuying")-1);
}
Re: OnPlayerKeyState change problem -
P3DRO - 15.03.2013
Код:
if(PRESSED(KEY_LEFT) && GetIntVar(playerid, "BrowsingSkins") == 1)
{
if(GetIntVar(playerid, "SkinBuying") == 1) return 1;
SetPlayerSkin(playerid, GetIntVar(playerid, "SkinBuying")-1);
SetIntVar(playerid, "SkinBuying", GetIntVar(playerid, "SkinBuying")-1);
}
if(PRESSED(KEY_RIGHT) && GetIntVar(playerid, "BrowsingSkins") == 1)
{
if(GetIntVar(playerid, "SkinBuying") == 299) return 1;
SetPlayerSkin(playerid, GetIntVar(playerid, "SkinBuying")+1);
SetIntVar(playerid, "SkinBuying", GetIntVar(playerid, "SkinBuying")+1);
}
Re: OnPlayerKeyState change problem -
PaulDinam - 15.03.2013
still not
I tried with other keys and it works