(2021-02-27, 12:46 PM)Boxi Wrote:(2021-02-26, 09:45 PM)destiezk Wrote: that's a bit more complicated. This is not the best way to make it at all, but I'm using this:
Code:new PlayerDM[5][3][MapInfo] =
{
{? ? ? ? ? //? X? ? ? ? Y? ? ? ? ? ? ? ? Z? ? ? A? ? ? ? ? ? ? Name
{1306.9261,2195.0313,11.0234,212.9963,"Baseball"}, // home
{1391.2493,2111.0488,11.0156,321.7007,"Baseball"},? // away
{1367.4415,2196.2263,14.2495,177.9026,"Baseball"} // spec
}
}
forward Timer();
public Timer()
{
new Float:zz;
GetPlayerPos(i, zz, zz, zz);
if(zz <? floatround(PlayerDM[Map][TEAM_HOME][z], floatround_ceil))
SetGravity(0.0);
}
and make a timer for the public that plays every 250ms for example.
Hello! First of all, thanks for answering C: could you explain to me what these coordinates are that you put here? is that I do not understand much. Thanks, again!
Code:{1306.9261,2195.0313,11.0234,212.9963,"Baseball"}, // home
{1391.2493,2111.0488,11.0156,321.7007,"Baseball"},? // away
{1367.4415,2196.2263,14.2495,177.9026,"Baseball"} // spec
Well it's what I use in my code.. I have three teams (Home, Away, Spectator) and it's their spawn position.
Otherwise, SetGravity() function is used for all players, you can use Pawn.Raknet and this https://github.com/Romz24/samp-gravity so you can actually make it.