25.04.2011, 03:51
I'm taking a complete swing in the dark but
I'm sure it needs to be
(mind me i'm new to scripting, so sorry if it doesnt help)
Код:
Float:GetDistanceToPoint(playerid,Float:x2,Float:y2,Float:z2) { if (IsPlayerConnected(playerid)) { new Float:x1,Float:y1,Float:z1; GetPlayerPos(playerid,x1,y1,z1); return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2)); } return 9999.9; }
Код:
stock Float:GetDistanceToPoint(playerid,Float:x2,Float:y2,Float:z2) { if (IsPlayerConnected(playerid)) { new Float:x1,Float:y1,Float:z1; GetPlayerPos(playerid,x1,y1,z1); return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2)); } return 9999.9; }