SA-MP Forums Archive
Set Gravity - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Set Gravity (/showthread.php?tid=87268)



Set Gravity - argon - 19.07.2009

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


Re: Set Gravity - Weirdosport - 19.07.2009

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.




Re: Set Gravity - Jefff - 19.07.2009

Код:
SetGravity(Float:gravity);



Re: Set Gravity - refshal - 19.07.2009

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


Re: Set Gravity - argon - 19.07.2009

whats that?


Re: Set Gravity - Correlli - 19.07.2009

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


Re: Set Gravity - refshal - 19.07.2009

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.


Re: Set Gravity - argon - 19.07.2009

where to get YSF


Re: Set Gravity - member - 19.07.2009

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



Re: Set Gravity - argon - 19.07.2009

cannot read from file: "YSF"