05.11.2016, 17:31
You're throwing the player to 0.0, 0.0, 0.0. Try this:
That will throw the player in front of him. damage will be the distance that the player will be throwed. You can change it to a constant value if you like.
I don't tested it IG, but I've done some test about that a long time ago. So I think it will work fine
pawn Код:
public OnPlayerCrashVehicle(playerid, vehicleid, Float:damage)
{
new Float:x, Float:y, Float:z, Float:angle;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z + 1.0);
GetVehicleZAngle(vehicleid, angle);
SetPlayerVelocity(playerid, x + (damage * floatsin(-angle, degrees), y + (damage * floatcos(-angle, degrees), 1.0);
return 1;
}
I don't tested it IG, but I've done some test about that a long time ago. So I think it will work fine