buy weapon with ALT key not working - 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: buy weapon with ALT key not working (
/showthread.php?tid=335557)
buy weapon with ALT key not working -
Andy_McKinley - 18.04.2012
I have this piece of script
pawn Код:
if(pickupid == knife)
{
weapon[playerid] = 4;
weaponcost[playerid] = 750;
ammo2[playerid] = 1;
TextDrawShowForPlayer(playerid, background);
#if defined WALK
TextDrawSetString(text2, "Use 'ALT' to buy. Cost $750.");
#else
TextDrawSetString(text2, "Use 'ALT' to buy. Cost $750.");
#endif
TextDrawShowForPlayer(playerid, text2);
wpicked[playerid] = 1;
SetTimerEx("HideText", 2000, false, "d", playerid);
}
i normally had this in my test gamemode and it worked fine. now i moved everything of this custom weapon buy thing into a filterscript and everything seems to be working . except, when i go in the custom ammu nation, and i walk into the weapon and I press ALT (the key to buy) it doesn't do anything. can someone help me please?
Re: buy weapon with ALT key not working -
Vince - 18.04.2012
And where's your OnPlayerKeyStateChange code? Or do you expect it to work by itself?
Re: buy weapon with ALT key not working -
Andy_McKinley - 18.04.2012
Quote:
Originally Posted by Vince
And where's your OnPlayerKeyStateChange code? Or do you expect it to work by itself?
|
oh man you are right, how could i forget it... thanks now fixing it