Problem With /rob Command [+REP]
#8

PHP код:

stock Float
:GetDistanceBetweenPoints(Float:x1Float:y1Float:z1Float:x2Float:y2Float:z2)
{
    return 
VectorSize(x1-x2y1-y2z1-z2);
}

stock GetClosestPlayerToPlayer(playeridFloat:dist 10.0)
{
    new 
Float:pos[6];
    
GetPlayerPos(playeridpos[0], pos[1], pos[2]);
    foreach(new 
Player)
    {
        if(
== playerid) continue;
        
GetPlayerPos(ipos[3], pos[4], pos[5]);
        if(
GetDistanceBetweenPoints(pos[0], pos[1], pos[2], pos[3], pos[4], pos[5]) <= dist) return i;
    }

This one should work properly.
Reply


Messages In This Thread
Problem With /rob Command [+REP] - by Youssef214 - 22.06.2014, 09:52
Re : Problem With /rob Command [+REP] - by S4t3K - 22.06.2014, 09:56
Re: Problem With /rob Command [+REP] - by Youssef214 - 22.06.2014, 09:58
Re : Problem With /rob Command [+REP] - by S4t3K - 22.06.2014, 10:00
Re: Problem With /rob Command [+REP] - by Youssef214 - 22.06.2014, 10:02
Re : Problem With /rob Command [+REP] - by S4t3K - 22.06.2014, 10:06
Re: Problem With /rob Command [+REP] - by Youssef214 - 22.06.2014, 10:08
Re : Problem With /rob Command [+REP] - by S4t3K - 22.06.2014, 10:13
Re: Problem With /rob Command [+REP] - by Youssef214 - 22.06.2014, 10:21
Re : Problem With /rob Command [+REP] - by S4t3K - 22.06.2014, 10:23

Forum Jump:


Users browsing this thread: 1 Guest(s)