14.01.2016, 16:25
[Plugin] MapAndreas plugin v1.0 beta
14.01.2016, 16:54
Quote:
|
Код:
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 |
14.01.2016, 21:07
Код:
#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;
}
15.01.2016, 12:45
Quote:
|
Код:
#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;
}
|
15.01.2016, 14:51
Quote:
|
You probably forgot to get angle of player. And calling floatsin and floatcos with NULL. Try to use https://sampwiki.blast.hk/wiki/GetPlayerFacingAngle
|
Read the code It's all there...
15.06.2017, 23:41
28.2MB ? Why is that so heavy
16.06.2017, 03:25
16.06.2017, 04:42
06.09.2017, 21:05
Eh, I might not have checked everywhere but what kind of "mode"'s is there?
Edit:
Edit:
Код:
#define MAP_ANDREAS_MODE_NONE 0 #define MAP_ANDREAS_MODE_MINIMAL 1 // for future use #define MAP_ANDREAS_MODE_FULL 2
« Next Oldest | Next Newest »
Users browsing this thread: 2 Guest(s)


