[Plugin] MapAndreas plugin v1.0 beta

Quote:
Originally Posted by Prokill911
Посмотреть сообщение
That's it.
It's surely your code. It can't possibly be anything to do with this plugin's includes.
Reply

Quote:
Originally Posted by Prokill911
Посмотреть сообщение
Код:
Inc's
#include <a_samp>
#include <core>
#include <dns>
#include <streamer>
#include <a_mysql>
#include <foreach>
#include <sscanf2>
#include <progress>
#include <mapandreas>
Код:
Plugins
whirlpool
streamer
sscanf
nativechecker
mysql
filefunctions
dns
crashdetect
MapAndreas
That's it.
Can you show us how are you using it? Also can you post how you initialize mapandreas ongamemodeinit?
Reply

Код:
#include <mapandreas>
OnGameModeInit
MapAndreas_Init(MAP_ANDREAS_MODE_FULL);
Код:
#define         MAX_Z_FISH_THRESHOLD            4.0
#define         WATER_CHECK_RADIUS              1.0

IsPlayerNearWater(playerid) {
	new Float:x, Float:y, Float:z, Float:checkx, Float:checky, Float:checkz, Float:angle;
	GetPlayerPos(playerid, x, y, z);
	if(z > 0.0 && z < MAX_Z_FISH_THRESHOLD) {
		for(new i = 0; i < 4; i++) {
	        checkx = x + (WATER_CHECK_RADIUS * floatsin(-angle, degrees));
		    checky = y + (WATER_CHECK_RADIUS * floatcos(-angle, degrees));
			angle += 90.0;

            MapAndreas_FindZ_For2DCoord(checkx, checky, checkz);

			if(checkz == 0.0) return 1;
		}
	}
	return 0;
}
Reply

Quote:
Originally Posted by Prokill911
Посмотреть сообщение
Код:
#include <mapandreas>
OnGameModeInit
MapAndreas_Init(MAP_ANDREAS_MODE_FULL);
Код:
#define         MAX_Z_FISH_THRESHOLD            4.0
#define         WATER_CHECK_RADIUS              1.0

IsPlayerNearWater(playerid) {
	new Float:x, Float:y, Float:z, Float:checkx, Float:checky, Float:checkz, Float:angle;
	GetPlayerPos(playerid, x, y, z);
	if(z > 0.0 && z < MAX_Z_FISH_THRESHOLD) {
		for(new i = 0; i < 4; i++) {
	        checkx = x + (WATER_CHECK_RADIUS * floatsin(-angle, degrees));
		    checky = y + (WATER_CHECK_RADIUS * floatcos(-angle, degrees));
			angle += 90.0;

            MapAndreas_FindZ_For2DCoord(checkx, checky, checkz);

			if(checkz == 0.0) return 1;
		}
	}
	return 0;
}
You probably forgot to get angle of player. And calling floatsin and floatcos with NULL. Try to use https://sampwiki.blast.hk/wiki/GetPlayerFacingAngle
Reply

Quote:
Originally Posted by Om3n
Посмотреть сообщение
You probably forgot to get angle of player. And calling floatsin and floatcos with NULL. Try to use https://sampwiki.blast.hk/wiki/GetPlayerFacingAngle
Didn't forget anything..
Read the code It's all there...
Reply

28.2MB ? Why is that so heavy
Reply

Quote:
Originally Posted by TheToretto
Посмотреть сообщение
28.2MB ? Why is that so heavy
That seems relatively light compared to my wife.
Reply

Quote:
Originally Posted by Pottus
Посмотреть сообщение
That seems relatively light compared to my wife.
420 kilograms I'm sure.
Reply

Eh, I might not have checked everywhere but what kind of "mode"'s is there?

Edit:
Код:
#define MAP_ANDREAS_MODE_NONE			0
#define MAP_ANDREAS_MODE_MINIMAL		1 // for future use
#define MAP_ANDREAS_MODE_FULL			2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)