07.01.2010, 14:08
Quote:
Originally Posted by waza75
It are Floats, Try this code for instance
Код:
if (!strcmp("/jump", cmdtext)) { SetPlayerVelocity(playerid,0.0,0.0,10.0); //Forces the player to jump return 1; } ![]() PS: You had it something like 100000000, make it in the code 10000000.0 .0 is needed I think. |
SetPlayerVelocity also does not work if you are stood on the ground, you need to be airborne however you can if your in a car.
Heres what i use to do a 10ft jump up in a car
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_FIRE))
{
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.3);
}
return 1;
}