[Tutorial] Fast tip: How to hide the map (icons, vehicles, radar)
#1

To hidden all map


Top of the code
pawn Code:
new blackmap ;

OnGameModeInit
pawn Code:
blackmap = GangZoneCreate(-3000.0,-3000.0,3000.0,3000.0);

OnPlayerSpawn
pawn Code:
GangZoneShowForPlayer(playerid, blackmap, 255);




To hide vehicles:


* Is not totally effective, but it helps hide.



Top of code:
pawn Code:
new vehicleMarkers[MAX_PLAYERS][10]; // 10 gang zones per player. Look at: https://sampwiki.blast.hk/wiki/Limits

OnGameModeInit
pawn Code:
for(new i; i ^ MAX_PLAYERS; i++)
    for(new j; j ^ sizeof vehicleMarkers[]; j++)
        vehicleMarkers[i][j] = -1;

OnVehicleStreamIn
pawn Code:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if(IsPlayerNPC(forplayerid))
        return false;

    static Float: vPos[3];

    GetVehiclePos(vehicleid, vPos[0],vPos[1],vPos[2]);

    static maxx[2], minn[2];

    maxx[0] = floatround(vPos[0] + 150.0);
    maxx[1] = floatround(vPos[1] + 150.0);

    minn[0] = floatround(vPos[0] - 150.0);
    minn[1] = floatround(vPos[1] - 150.0);

    for(new z ; z ^ sizeof vehicleMarkers[]; z++) {

        static Float:x, Float:y ;

        x = float(random(maxx[0]-minn[0])+minn[0]);
        y = float(random(maxx[1]-minn[1])+minn[1]);

        if(~vehicleMarkers[forplayerid][z]) GangZoneDestroy(vehicleMarkers[forplayerid][z]);

        vehicleMarkers[forplayerid][z] = GangZoneCreate(x,y,x+9.0,y+9.0);

        GangZoneShowForPlayer(forplayerid, vehicleMarkers[forplayerid][z], 0x5a697baa); // color research by me.
    }
    return true;
}




* To hide the radar see this: https://sampforum.blast.hk/showthread.php?tid=320117

Thanks
Reply
#2

Creating a gangzone is actually much better than creating textdraws. It looks more appealing, at least. Good effort.
Reply
#3

nice nice
Reply
#4

Looks good but is it possible to hide the map?
Reply
#5

I like this, good for servers that are end of the world based, nice work!
Reply
#6

Quote:
Originally Posted by Stuun
View Post
Looks good but is it possible to hide the map?
With textdraw.
just type a dot as the string and enlarge it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)