Problem with SetPlayerVelocity
#7

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;
  }
Hope it will work


PS: You had it something like 100000000, make it in the code 10000000.0
.0 is needed I think.
Putting it on 100000000 wont make it work at all it doesn't need to be that high, try 0.6.
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;
}
Reply


Messages In This Thread
Problem with SetPlayerVelocity - by Celson - 07.01.2010, 10:04
Re: Problem with SetPlayerVelocity - by [HiC]TheKiller - 07.01.2010, 10:11
Re: Problem with SetPlayerVelocity - by Calon - 07.01.2010, 10:12
Re: Problem with SetPlayerVelocity - by Celson - 07.01.2010, 11:25
Re: Problem with SetPlayerVelocity - by waza75 - 07.01.2010, 12:42
Re: Problem with SetPlayerVelocity - by waza75 - 07.01.2010, 13:01
Re: Problem with SetPlayerVelocity - by V1ceC1ty - 07.01.2010, 14:08
Re: Problem with SetPlayerVelocity - by waza75 - 07.01.2010, 15:16
Re: Problem with SetPlayerVelocity - by Calon - 07.01.2010, 16:28
Re: Problem with SetPlayerVelocity - by V1ceC1ty - 07.01.2010, 16:39

Forum Jump:


Users browsing this thread: 1 Guest(s)