06.12.2009, 07:25
You were right to replace ALL of them, but I'm not sure why you're doing it that way. I could probably cut this down to 10 or so lines.
And that's your entire PlayerToPoint region. (Including the "~R~Out Of Range" part)
pawn Код:
new Float:x,Float:y,Float:z,Float:ox,Float:oy,Float:oz,tmpdist;
GetObjectPos(C4[playerid],ox,oy,oz);
GetPlayerPos(playerid,x,y,x);
tmpdist = floatsqroot( (ox-x)*(ox-x) + (oy-y)*(oy-y) + (oz-z)*(oz-z) );
new tmpspacestr[37]=" ";
new tmptextstr[38];
format(tmptextstr,sizeof(tmptextstr),"%.*si",(tmpdist/10),tmpspacestr);
TextDrawSetString(Meter1[playerid],tmptextstr);
format(tmptextstr,sizeof(tmptextstr),"%s",((tmpdist/10)>36) ? ("~R~Out Of Range") : (" Range"));
TextDrawSetString(Meter3[playerid],tmptextstr);