Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Creezi functia
- stock Float:GetDistanceBetweenPoints(Float:pos1X, Float:pos1Y, Float:pos1Z, Float:pos2X, Float:pos2Y, Float:pos2Z)
- {
- return floatadd(floatadd(floatsqroot(floatpower(floatsub(pos1X, pos2X), 2)), floatsqroot(floatpower(floatsub(pos1Y, pos2Y), 2))), floatsqroot(floatpower(floatsub(pos1Z, pos2Z), 2)));
- }
- // Dupa care inlocuiesti
- else if(IsInHQ(findid))
- {
- new Float:jucatorX, Float:jucatorY, Float:jucatorZ;
- new Float:sediuX, Float:sediuY, Float:sediuZ;
- GetHQ(findid, sediuX,sediuY,sediuZ);
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid,sediuX,sediuY,sediuZ, 3.0);
- format(gString, sizeof(gString), "Distanta pana la ~y~%s~w~: ~y~%0.1f~w~m",GetName(findid),GetDistanceBetweenPoints(jucatorX, jucatorY, jucatorZ, sediuX, sediuY, sediuZ));
- PlayerTextDrawSetString(playerid, FindTD[1][playerid], gString);
- ShowFindTD(playerid);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement