Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /****
- *
- * MapAndreas Cached in Pawn
- * Version 0.1
- * Made by ipsBruno, thanks to RyDeR and KyeMaN
- *
- ***/
- new Float: propertyNames [6001][6001];
- stock InitMapAndreas(m = 0) {
- print("Carregando MapAndreas! Aguarde.");
- new File: s_hMap = fopen("SAfull.hmap", io_read);
- for(new Float:fX = -3000.0; fX < 3000.0; fX += 1.0) {
- for(new Float: fY = -3000.0; fY < 3000.0; fY += 1.0) {
- new
- afZ[1]
- ;
- fseek(s_hMap, ((6000 * (-floatround(fY, floatround_tozero) + 3000) + (floatround(fX, floatround_tozero) + 3000)) << 1));
- fblockread(s_hMap, afZ);
- propertyNames[floatround(fX+3000.0)][floatround(fY+3000.0)] = Float:((((afZ[0] >>> 16) * 0.01)));
- }
- }
- fclose(s_hMap);
- print("SAfull.hmap carregado na memória com sucesso!");
- #if defined HooK_OnGameModeInit
- return HooK_OnGameModeInit();
- #endif
- #pragma unused m
- }
- #define MapAndreas_FindZ_For2DCoord MapFindZ
- #define MapAndreas_Init InitMapAndreas
- stock Float: MapFindZ(Float: x,Float: y, &Float:z) {
- return z = propertyNames[floatround(x+3000.0)][floatround(y+3000.0)];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement