13.05.2017, 11:50
You're not checking if the loop is finding your playerid or not. This should fix it.
PHP код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(i==playerid) continue;
if(GetDistanceBetweenPlayers(playerid,i) < 6.0)
{
new Float:vec[4];
GetPlayerFacingAngle(i,Float:Angle);
GetPlayerVelocity(i,Float:x,Float:y,Float:z);
SetPlayerVelocity(i,Float:x+0.3,Float:y+0.3,Float:z+0.2);
SetPlayerFacingAngle(i,Float:Angle);
GetPlayerVelocity(i,vec[0],vec[1],vec[2]); GetPlayerFacingAngle(i,vec[3]);
}
}