29.10.2009, 18:39
Does detecting KEY_FIRE under OnPlayerKeyStateChange work properly? Because in my script, it's not functioning, I tried to debug it, and it seems as if it's not even detecting it correctly..
pawn Код:
else if ((newkeys & (KEY_FIRE)) == (KEY_FIRE))
{
SendClientMessage(playerid, red, "works");
if(bombplaced[playerid] == 1)
{
if(GetPlayerWeapon(playerid) == 40)
{
new plname[MAX_PLAYER_NAME];
new year, month,day;
getdate(year, month, day);
GetPlayerName(playerid, plname, sizeof(plname));
CreateExplosion(Float:BombX[playerid], Float:BombY[playerid], Float:BombZ[playerid], 6, 10.0);
SendClientMessage(playerid, red, "Your bomb has been detonated.");
bombplaced[playerid] = 0;
DestroyObject(bomb[playerid]);
}
}
}