Advertisement
Guest User

Include InteriorVW

a guest
Nov 23rd, 2011
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.28 KB | None | 0 0
  1. /*
  2.  *                   Interior Virtual World 1.0
  3.  *           (c) Copyright 2011 by Mateuscm (Mattos)
  4.  *
  5.  * Author: Mateus Costa de Mattos (http://www.brasilwarzone.com)
  6.  * Date: 23th november 2011
  7.  *
  8.  * Do not remove the credits
  9.  * (Nao remova os créditos)
  10.  *                      
  11.  * Feel free to edit the include
  12.  * (Sinta-se livre para editar o include)
  13.  *
  14.  */
  15.  
  16.  
  17. #include <a_samp>
  18.  
  19. stock Float:restfloat(Float:dividend, Float:divisor)
  20. {
  21.     new r[2];
  22.     new s[10];
  23.     r[0] = floatround(1000 * dividend, floatround_ceil);
  24.     r[1] = floatround(1000 * divisor, floatround_ceil);
  25.     valstr(s, (r[0] % r[1]), false);
  26.     s[strlen(s)] = '0';
  27.     new len = strlen(s);
  28.     s[len-2] = s[len-3];
  29.     s[len-3] = s[len-4];
  30.     s[len-4] = '.';
  31.     return floatstr(s);
  32. }
  33.  
  34. stock InteriorVW(playerid)
  35. {
  36.     new Float:PosX, Float:PosY, Float:PosZ; GetPlayerPos(playerid, PosX, PosY, PosZ);
  37.     new Float:PosSum = (PosX + PosY + PosZ) - restfloat((PosX + PosY + PosZ), 1);                      
  38.     new PosSumInt = 0;    
  39.     if (PosSum < 0)    
  40.     {
  41.         PosSumInt = floatround((0-PosSum), floatround_round);  
  42.     }    
  43.     else    
  44.     {
  45.         PosSumInt = floatround((PosSum), floatround_round);    
  46.     }
  47.     new VW = ((PosSumInt/10)%65999)*10;
  48.     return VW;
  49. }
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement