SA-MP Forums Archive
how would this workout ? - 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)
+--- Thread: how would this workout ? (/showthread.php?tid=332105)



how would this workout ? - spd_sahil - 07.04.2012

pawn Код:
stock GetPlayerDistanceFromPlayer(player1,player2)
{
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(player2,X,Y,Z);
    new distance = GetPlayerDistanceFromPoint(player1,X,Y,Z);
   
    return distance;
}



Re: how would this workout ? - Rob_Maate - 07.04.2012

If your 'GetPlayerDistanceFromPoint' code is correct, that will work fine provided you give distance a Float: tag


Re: how would this workout ? - captainjohn - 07.04.2012

pawn Код:
stock Float: GetPlayerDistanceFromPlayer(playerid, giveplayerid)
{
Such as this.


Re: how would this workout ? - Rob_Maate - 07.04.2012

No lol

new Float:distance


Re: how would this workout ? - spd_sahil - 07.04.2012

ahhhhh.. yes new Float:distance thanks