Distance between players
#10

Quote:
Originally Posted by thefirestate
Посмотреть сообщение
Код:
GetDistanceBetweenPlayers(playera, playerb)
{
    if(!IsPlayerConnected(playera) || !IsPlayerConnected(playerb))
    {
        return -1.00;
    }
    new Float:pPos[3], Float:pDistance;
    GetPlayerPos(playerb, pPos[0], pPos[1], pPos[2]);
    pDistance = GetPlayerDistanceFromPoint(playera, pPos[0], pPos[1], pPos[2]);
    return pDistance;
}
Can you try with this code?
Hey what would i've to do to set a textdraw string with this code and get the distance in either m / km "Distance 346 M" / "Distance 1.9 KM" Thanks..
Reply


Messages In This Thread
Distance between players - by StR_MaRy - 09.09.2016, 00:11
Re: Distance between players - by thefirestate - 09.09.2016, 00:36
Re: Distance between players - by StR_MaRy - 09.09.2016, 00:38
Re: Distance between players - by thefirestate - 09.09.2016, 00:41
Re: Distance between players - by StR_MaRy - 09.09.2016, 00:46
Re: Distance between players - by thefirestate - 09.09.2016, 00:51
Re: Distance between players - by StR_MaRy - 09.09.2016, 01:00
Re: Distance between players - by thefirestate - 09.09.2016, 01:06
Re: Distance between players - by StR_MaRy - 09.09.2016, 01:11
Re: Distance between players - by ISmokezU - 09.09.2016, 01:15

Forum Jump:


Users browsing this thread: 1 Guest(s)