28.04.2018, 18:55
Here are the funcations, you just do the rest in your code.
Код:
function IsNearPlayer(playerid, targetid) { new Float: Coordss[3]; GetPlayerPos(playerid, Coordss[0], Coordss[1], Coordss[2]); if(IsPlayerInRangeOfPoint(targetid, 20.0, Coordss[0], Coordss[1], Coordss[2]) && (GetPlayerVirtualWorld(targetid) == GetPlayerVirtualWorld(playerid))) return 1; return 0; } function IsNearPlayer2(Float:range, playerid, targetid) { new Float: Coordss[3]; GetPlayerPos(playerid, Coordss[0], Coordss[1], Coordss[2]); if(IsPlayerInRangeOfPoint(playerid, range, Coordss[0], Coordss[1], Coordss[2]) && (GetPlayerVirtualWorld(targetid) == GetPlayerVirtualWorld(playerid))) return 1; return 0; }