public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_FIRE)
{
if (IsPlayerInAnyVehicle(playerid) && GetVehicleModel(GetPlayerVehicleID(playerid)) != 476)
{
return SendClientMessage(playerid, 0xFF0000AA, "");
}
else
{
new Float:VBPos[3];
new Float:X, Float:Y, Float:Z;
GetVehiclePos(GetPlayerVehicleID(playerid),VBPos[0],VBPos[1],VBPos[2]);
MapAndreas_FindZ_For2DCoord(VBPos[0], VBPos[1], VBPos[2]);
CreateExplosion(VBPos[0], VBPos[1], VBPos[2], 7, 20.0);
GetPlayerPos(playerid, X, Y, Z);
format(Stringz, sizeof(Stringz), "You've droped a bomb at the Destination Of "cred"%0.0f, %0.0f, %0.0f ", X, Y, Z);
SendClientMessage(playerid, orange, Stringz);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~>~~w~Bomb ~r~Droped~<~", 3000, 3);
}
}
format(Stringz, sizeof(Stringz), "You've droped a bomb at the Destination Of "cred"%0.0f, %0.0f, %0.0f ", X, Y, Z);
SendClientMessage(playerid, orange, Stringz);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~>~~w~Bomb ~r~Droped~<~", 3000, 3);
}
new bombs[MAX_PLAYERS];
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_FIRE)
{
if (IsPlayerInAnyVehicle(playerid) && GetVehicleModel(GetPlayerVehicleID(playerid)) != 476)
{
return SendClientMessage(playerid, 0xFF0000AA, "");
}
else
{
if(bombs[playerid] != 5)
{
new Float:VBPos[3];
new Float:X, Float:Y, Float:Z;
GetVehiclePos(GetPlayerVehicleID(playerid),VBPos[0],VBPos[1],VBPos[2]);
MapAndreas_FindZ_For2DCoord(VBPos[0], VBPos[1], VBPos[2]);
bombs[playerid]++;
CreateExplosion(VBPos[0], VBPos[1], VBPos[2], 7, 20.0);
GetPlayerPos(playerid, X, Y, Z);
format(Stringz, sizeof(Stringz), "You've droped a bomb at the Destination Of "cred"%0.0f, %0.0f, %0.0f ", X, Y, Z);
SendClientMessage(playerid, orange, Stringz);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~>~~w~Bomb ~r~Droped~<~", 3000, 3);
}
else return SendClientMessage(playerid, 0xFF0000AA, "the message you want to appear.");
}
}
if(newkeys == KEY_FIRE)
if(newkeys & KEY_FIRE)
if(newkeys & KEY_FIRE)
|
tell him why not to do that, it will help him to prevent this..
We dont use pawn Код:
|