Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Interior Virtual World 1.0
- * (c) Copyright 2011 by Mateuscm (Mattos)
- *
- * Author: Mateus Costa de Mattos (http://www.brasilwarzone.com)
- * Date: 23th november 2011
- *
- * Do not remove the credits
- * (Nao remova os créditos)
- *
- * Feel free to edit the include
- * (Sinta-se livre para editar o include)
- *
- */
- #include <a_samp>
- stock Float:restfloat(Float:dividend, Float:divisor)
- {
- new r[2];
- new s[10];
- r[0] = floatround(1000 * dividend, floatround_ceil);
- r[1] = floatround(1000 * divisor, floatround_ceil);
- valstr(s, (r[0] % r[1]), false);
- s[strlen(s)] = '0';
- new len = strlen(s);
- s[len-2] = s[len-3];
- s[len-3] = s[len-4];
- s[len-4] = '.';
- return floatstr(s);
- }
- stock InteriorVW(playerid)
- {
- new Float:PosX, Float:PosY, Float:PosZ; GetPlayerPos(playerid, PosX, PosY, PosZ);
- new Float:PosSum = (PosX + PosY + PosZ) - restfloat((PosX + PosY + PosZ), 1);
- new PosSumInt = 0;
- if (PosSum < 0)
- {
- PosSumInt = floatround((0-PosSum), floatround_round);
- }
- else
- {
- PosSumInt = floatround((PosSum), floatround_round);
- }
- new VW = ((PosSumInt/10)%65999)*10;
- return VW;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement