13.03.2013, 16:43
pawn Код:
forward OnPlayerShootVehicle(playerid, vehicleid, unoccupied, weaponid, Float:heathlost);
public OnPlayerShootVehicle(playerid, vehicleid, unoccupied, weaponid, Float:heathlost)
{
if(GetPlayerWeapon(playerid) == 23 && speedgun[playerid] == 1)
{
new str[128];
new Float:Velocity[3]
format(str,128,"The speed is %d km/h.",GetVehicleSpeed(vehicleid));
SendClientMessage(playerid, COLOR_WHITE, str);
}
print("This public has debugged as worked.");
return 0;
}
GetVehicleSpeed(car)
{
new
Float:X,
Float:Y,
Float:Z;
GetVehicleVelocity(car, X, Y, Z);
new Float:Total = floatsqroot(X*X, Y*Y, Z*Z);
return Total*100;
}