"Unknown" gamemode, when IsPlayerNearWater
#1

Hello, when i put this to my script, it will say "unknown" on the gamemode when i turn on the server, what is wrong? rep+

pawn Код:
#include <mapandreas>

#define         MAX_Z_FISH_THRESHOLD            4.0
#define         WATER_CHECK_RADIUS              5.0

pawn Код:
IsPlayerNearWater(playerid)
{
    new Float:x, Float:y, Float:z, Float:checkx, Float:checky, Float:checkz, Float:angle;

    GetPlayerPos(playerid, x, y, z);

    // Make sure player is at correct Z-Height (Will not work near the dam)
    if(z > 0.0 && z < MAX_Z_FISH_THRESHOLD)
    {
        // Check North/East/South/West for water
        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;

            // Find the Z
            MapAndreas_FindZ_For2DCoord(checkx, checky, checkz);

            // Doesn't work under bridges
            if(checkz == 0.0) return 1;
        }
    }
    return 0;
}
Reply
#2

Anyone know the issue?
Reply
#3

I don't see any unknown message, Who else can see?
#ExplainMore
Reply
#4

Also, i can compile the script, and when i turn on the server, and open samp, i refresh the server, but i cant connect to the server because it says Mode: Unknown
Reply
#5

show us server_log please
Reply
#6

pawn Код:
[18:29:21] Error: Unknown Windows server version
Reply
#7

But the server works fine when i remove the IsPlayerNearWater function
Reply
#8

Can anyone help me?
Reply
#9

Hello!

Do you have the latest version of mapandreas? If not, please update this plugin and include.
Reply
#10

Where to find the newest version of mapandreas, i have been searching around, but i cant find it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)