Advertisement
hopingsteam

Ardelean Cristian

Jun 5th, 2017
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.87 KB | None | 0 0
  1. //Creezi functia
  2.  
  3. stock Float:GetDistanceBetweenPoints(Float:pos1X, Float:pos1Y, Float:pos1Z, Float:pos2X, Float:pos2Y, Float:pos2Z)
  4. {
  5.     return floatadd(floatadd(floatsqroot(floatpower(floatsub(pos1X, pos2X), 2)), floatsqroot(floatpower(floatsub(pos1Y, pos2Y), 2))), floatsqroot(floatpower(floatsub(pos1Z, pos2Z), 2)));
  6. }
  7.  
  8. // Dupa care inlocuiesti
  9.  
  10. else if(IsInHQ(findid))
  11. {
  12.     new Float:jucatorX, Float:jucatorY, Float:jucatorZ;
  13.     new Float:sediuX, Float:sediuY, Float:sediuZ;
  14.    
  15.     GetHQ(findid, sediuX,sediuY,sediuZ);
  16.     DisablePlayerCheckpoint(playerid);
  17.     SetPlayerCheckpoint(playerid,sediuX,sediuY,sediuZ, 3.0);
  18.     format(gString, sizeof(gString), "Distanta pana la ~y~%s~w~: ~y~%0.1f~w~m",GetName(findid),GetDistanceBetweenPoints(jucatorX, jucatorY, jucatorZ, sediuX, sediuY, sediuZ));
  19.     PlayerTextDrawSetString(playerid, FindTD[1][playerid], gString);
  20.     ShowFindTD(playerid);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement