Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jun 22nd, 2018 56 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. public UpdatePlayerPos()
  2. {
  3.     new Float:Pos[3];
  4.     foreach(Player, i)
  5.     {
  6.         if(!IsPlayerConnected(i)) continue;
  7.         GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
  8.         if(GetPlayerState(i) == PLAYER_STATE_ONFOOT)
  9.         {
  10.             PlayerInfo[i][pDistance] = floatround(floatsqroot(GetPVarFloat(i, "OLDX") -Pos[0]) * (GetPVarFloat(i, "OLDX") -Pos[0]) + (GetPVarFloat(i, "OLDY") -Pos[1]) * (GetPVarFloat(i, "OLDY") -Pos[1]) + (GetPVarFloat(i, "OLDZ") -Pos[2]) * (GetPVarFloat(i, "OLDZ") -Pos[2]), floatround_floor);
  11.             SetPVarFloat(i, "OLDX", Pos[0]);
  12.             SetPVarFloat(i, "OLDY", Pos[1]);
  13.             SetPVarFloat(i, "OLDZ", Pos[2]);
  14.         }
  15.     }
  16.     return 1;
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top