21.11.2009, 08:34
I made a cmd /plantbomb so when someone use its it creates an object and it gives him a detonator but the problem is here....I want to the function OnPlayerKeyStateChange when the player press the fire button,an explosion will be created but only if he has a detonator.
Look at this Lines:
First it was like this and it was working but the player was able to do it by punching or something:
Then I made it like this:
But its not working.Help Please!!!
Look at this Lines:
First it was like this and it was working but the player was able to do it by punching or something:
Код:
if ((newkeys==KEY_FIRE)) { DestroyObject(bomb); CreateExplosion(bomb_x[playerid], bomb_y[playerid], bomb_z[playerid], 12, 4.0); }
Код:
if ((newkeys==KEY_FIRE && GetPlayerWeapon(playerid) == 40)) { DestroyObject(bomb); CreateExplosion(bomb_x[playerid], bomb_y[playerid], bomb_z[playerid], 12, 4.0); }