OnPlayerClickMap [MapAndreas]
#1

I have no idea whats going because SetPlayerPosFindZ works perfectly (with the crappy accuracy)....

Note: IsLogged and CharSpawned (Along with IsModerator(playerid, MODERATOR_LEVEL_JUNIOR) || IsStaff(playerid, STAFF_LEVEL_OPERATORI)) all work fine.

pawn Код:
public OnGameModeInit()
{
    LoadMySQLEnviroment();
    MapAndreas_Init(MAP_ANDREAS_MODE_MINIMAL);
}


public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
    if(IsLogged(playerid) && CharSpawned(playerid))
    {
        if(IsModerator(playerid, MODERATOR_LEVEL_JUNIOR) || IsStaff(playerid, STAFF_LEVEL_OPERATORI))
        {
            if(IsOnModeratorDuty(playerid) || IsOnStaffDuty(playerid))
            {
                new Float: BaseZ;
                MapAndreas_FindAverageZ(fX,fY, BaseZ);
                SetPlayerPos(playerid, fX, fY, BaseZ);
            }
        }
    }
    return true;   
}
Reply
#2

Does it teleport the player at all? Or just to a bad position?
Reply
#3

Doesn't teleport me at-all.
Reply
#4

Try using print statements to see how far the code goes. It seems like the code isn't reaching that end part.
Reply
#5

Seems the function isn't being called at-all. (This: OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ))
Reply
#6

Try clicking the waypoint a few times; IIRC this bugs a bit and isn't called every time for some reason. Although; I could be wrong.
Reply
#7

Already tried that, no idea whats going on TBH.
Reply
#8

bump, still an issue.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)