Set Gravity
#1

HEEEEELPPP lol
xD
if(strcmp(cmdtext, "/gravityon", true) == 0)
{
if (IsPlayerInAnyVehicle(playerid)) {
SetGravity(playerid,0.0001);
}
else
SetPlayerPos(playerid,2412.9495,-1740.1138,13.382;
SendClientMessage(playerid,GREEN,"If you appear falling type again /megajump"); <<<<<< HERE IS BE THE SAME BUT I AINT TRIED
return 1;
}
That returns me
number of arguments does not match definition
Reply
#2

Well first sort out the frankly horrible indentation:

pawn Код:
if(strcmp(cmdtext, "/gravityon", true) == 0)
{
    if (IsPlayerInAnyVehicle(playerid))
    {
        SetGravity(playerid,0.0001);
    }
    else
    {
        SetPlayerPos(playerid,2412.9495,-1740.1138,13.3828);
        SendClientMessage(playerid,GREEN,"If you appear falling type again /megajump"); <<<<<< HERE IS BE THE SAME BUT I AINT TRIED
    }
    return 1;
}
The problem is that this is a load of rubbish: SetGravity(playerid,0.0001);

The SetGravity function has nothing to do with indivudual players, it effects the server as a whole. If you check the wiki HERE you'll see for yourself.

Quote:
Parameters:
Float:gravity The amount of gravity.

Reply
#3

Код:
SetGravity(Float:gravity);
Reply
#4

You can't use SetGravity(playerid, gravity);. Try using YSF, it got SetPlayerGravity.
Reply
#5

whats that?
Reply
#6

Quote:
Originally Posted by argon
whats that?
http://forum.sa-mp.com/index.php?topic=83109.0
Reply
#7

Quote:
Originally Posted by ByFukara
SetPlayerGravity(playerid, gravity); for player
That will only work with YSF. This thing isn't included in SA-MP, ****** made the function.
Reply
#8

where to get YSF
Reply
#9

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by argon
whats that?
http://forum.sa-mp.com/index.php?topic=83109.0
Reply
#10

cannot read from file: "YSF"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)