05.03.2011, 21:05
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new key, updown, leftright;
GetPlayerKeys(playerid, key, updown, leftright);
printf("%d",key);
if(key == 140)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 476)
{
new bombaid;
new Float:X,Float:Y,Float:Z,Float:a;
GetPlayerPos(playerid,X,Y,Z);
SetPlayerFacingAngle(playerid,a);
bombaid = CreateObject(354,X,Y,Z,0,0,a);
new ddb = 10;
MoveObject(bombaid,X,Y,Z-ddb,1);
new ddb2=ddb*1000;
SetTimerEx("explodirBomba",ddb2,false,"dfff",bombaid);
}
}
}