12.08.2014, 11:41
To hidden all map
Top of the code
OnGameModeInit
OnPlayerSpawn
To hide vehicles:
* Is not totally effective, but it helps hide.
Top of code:
OnGameModeInit
OnVehicleStreamIn
* To hide the radar see this: https://sampforum.blast.hk/showthread.php?tid=320117
Thanks
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