25.07.2012, 21:42
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
{
if(IsPlayerInAnyVehicle(playerid))
{
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
new Float:vehx, Float:vehy, Float:vehz,Float:vehz_rot;
GetXYInFrontOfPlayer(playerid,vehx,vehy,5);
CreateObject(18648,vehx , vehy, vehz, vehz_rot);
}
}
return 1;
}