Key FIRE is not working
#1

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.
Reply
#2

Try changing if(newkeys & KEY_FIRE) to if(newkeys && KEY_LBUTTON)

Edit: Just saw you fixed it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)