Help me please
#2

You don't have defined GetDistanceBetweenPlayers.Try this:

Код:
stock Float:GetDistanceBetweenPlayers(playerid,targetplayerid)
{
    new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
    if(!IsPlayerConnected(playerid) || !IsPlayerConnected(targetplayerid)) {
        return -1.00;
    }
    GetPlayerPos(playerid,x1,y1,z1);
    GetPlayerPos(targetplayerid,x2,y2,z2);
    return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}
Reply


Messages In This Thread
Help me please - by Goldino - 18.11.2012, 17:51
Re: Help me please - by Plovix - 18.11.2012, 18:00
Re: Help me please - by Goldino - 18.11.2012, 18:04

Forum Jump:


Users browsing this thread: 2 Guest(s)