28.11.2015, 17:02
editpawn... nгo funcionou
Код:
stock Checarveiculoportamala(Float:radi, playerid, vehicleid) { if(IsPlayerConnected(playerid)) { new Float:PX,Float:PY,Float:PZ,Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,PX,PY,PZ); GetVehiclePos(vehicleid, X,Y,Z); new Float:Distance = (X-PX)*(X-PX)+(Y-PY)*(Y-PY)+(Z-PZ)*(Z-PZ); if(Distance <= radi*radi) { return 1; } } return 0; }