SA-MP Forums Archive
OnPlayerClickMap [MapAndreas] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerClickMap [MapAndreas] (/showthread.php?tid=552468)



OnPlayerClickMap [MapAndreas] - zT KiNgKoNg - 24.12.2014

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;   
}



Re: OnPlayerClickMap [MapAndreas] - Abagail - 24.12.2014

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


Re: OnPlayerClickMap [MapAndreas] - zT KiNgKoNg - 24.12.2014

Doesn't teleport me at-all.


Re: OnPlayerClickMap [MapAndreas] - Abagail - 24.12.2014

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


Re: OnPlayerClickMap [MapAndreas] - zT KiNgKoNg - 24.12.2014

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


Re: OnPlayerClickMap [MapAndreas] - Abagail - 24.12.2014

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.


Re: OnPlayerClickMap [MapAndreas] - zT KiNgKoNg - 24.12.2014

Already tried that, no idea whats going on TBH.


Re: OnPlayerClickMap [MapAndreas] - zT KiNgKoNg - 26.12.2014

bump, still an issue.