Key FIRE is 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: Key FIRE is not working (
/showthread.php?tid=506121)
Key FIRE is not working -
ShoortyFl - 11.04.2014
Hi, im trying to do something with KEY_FIRE but it just won't work. Here's the code, so help me please..
Код:
if(newkeys & KEY_FIRE)
{
if(!IsPlayerInAnyVehicle(playerid) && KupiSmece[playerid] == 1)
{
new Float:Pos[3];
for(new i = 0; i < sizeof(Kontenjer); i++)
{
GetDynamicObjectPos(Kontenjer[i], Pos[0],Pos[1],Pos[2]);
if(IsPlayerInRangeOfPoint(playerid,3.0,Pos[0],Pos[1],Pos[2]))
{
if(Kontenjer[i] == 999) return SCM(playerid, TOMATO, " (greska) U ovom kontenjeru vise nema smeca !");
if(Ispraznjeno[playerid] == 1) return SCM(playerid, TOMATO, " (greska) Prvo morate da ubacite smece u kontenjer !");
SetPlayerAttachedObject(playerid, 0, 1265, 6, 0.298000, -0.031999, -0.050000, 0.000000, -104.599983, 0.000000, 0.683000, 0.648999, 1.077999, 0, 0);
Kontenjer[i] = 999;
PokupljenoSmeca[playerid] ++;
SCMF(playerid, WHITE, " (info) Uspesno ste ubacili smece u vozilo, trenutno ste ispraznili %d od 10 kontenjera !", PokupljenoSmeca);
DestroyDynamicMapIcon(KontenjerIkona[i]);
}
}
}
}
Edit: I got it working, lock please.
Re: Key FIRE is not working -
Hudgens - 11.04.2014
Try changing if(newkeys & KEY_FIRE) to if(newkeys && KEY_LBUTTON)
Edit: Just saw you fixed it.