SA-MP Forums Archive
Player icons - 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: Player icons (/showthread.php?tid=310808)



Player icons - [SLA]devon_R - 13.01.2012

How to i make players show on the mini map radar?

how do i script this?


Re: Player icons - LiamM - 13.01.2012

Its shown by default, check on OnGameModeInit and make sure ShowPlayerMarkers() isn't anywhere there.

Rep if I helped.


Re: Player icons - [SLA]devon_R - 13.01.2012

ShowPlayerMarkers() is not there, player icons are still not shown


Re: Player icons - LiamM - 13.01.2012

Hmm... Is there other players on apart from you? It could possibly be in a stock thats being loaded OnGameModeInit... Sometimes it can be hidden away if your using a script that you've downloaded...

If it's only you online you won't see the player icon... if not.. Check if theres any stocks being loaded.


Re: Player icons - [SLA]devon_R - 13.01.2012

stocks loaded? i dont understand.

im a terrible scripter!

if there is stock, what do i remove in the gamemode?


Re: Player icons - [SLA]devon_R - 13.01.2012

I had 7 players and there were no icons


Re: Player icons - [SLA]devon_R - 13.01.2012

is this what your talking about?

stock GetPlayer2DZone(playerid, zone[], len)
{
new Float22, Float:y22, Float:z22;
GetPlayerPos(playerid, x22, y22, z22);
for(new i = 0; i != sizeof(gSANZones); i++ )
{
if(x22 >= gSANZones[i][SAZONE_AREA][0] && x22 <= gSANZones[i][SAZONE_AREA][3] && y22 >= gSANZones[i][SAZONE_AREA][1] && y22 <= gSANZones[i][SAZONE_AREA][4])
{
return format(zone, len, gSANZones[i][SAZONE_NAME], 0);
}
}
return 0;
}

stock GetPlayer2DRadarZone(playerid, zone[], len)
{
new Float22, Float:y22, Float:z22;
GetPlayerPos(playerid, x22, y22, z22);
for(new i = 0; i != sizeof(gSAZones); i++ )
{
if(x22 >= gSAZones[i][SAZONE_AREA][0] && x22 <= gSAZones[i][SAZONE_AREA][3] && y22 >= gSAZones[i][SAZONE_AREA][1] && y22 <= gSAZones[i][SAZONE_AREA][4])
{
return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
}
}
return 0;
}

stock GetVehicle2DZone(vehicleid, zone[], len)
{
new Float22, Float:y22, Float:z22;
GetVehiclePos(vehicleid, x22, y22, z22);
for(new i = 0; i != sizeof(gSANZones); i++ )
{
if(x22 >= gSANZones[i][SAZONE_AREA][0] && x22 <= gSANZones[i][SAZONE_AREA][3] && y22 >= gSANZones[i][SAZONE_AREA][1] && y22 <= gSANZones[i][SAZONE_AREA][4])
{
return format(zone, len, gSANZones[i][SAZONE_NAME], 0);
}
}
return 0;
}

stock GetPlayer3DZone(playerid, zone[], len)
{
new Float33, Float:y33, Float:z33;
GetPlayerPos(playerid, x33, y33, z33);
for(new i = 0; i != sizeof(gSAZones); i++ )
{
if(x33 >= gSAZones[i][SANZONE_AREA][0] && x33 <= gSAZones[i][SANZONE_AREA][3] && y33 >= gSANZones[i][SAZONE_AREA][1] && y33 <= gSANZones[i][SAZONE_AREA][4] && z33 >= gSAZones[i][SANZONE_AREA][2] && z33 <= gSANZones[i][SAZONE_AREA][5])
{
return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
}
}
return 0;
}




stock IsPlayerInZone(playerid, zone[])
{
new TmpZone[MAX_ZONE_NAME];
GetPlayer3DZone(playerid, TmpZone, sizeof(TmpZone));
for(new i = 0; i != sizeof(gSANZones); i++)
{
if(strfind(TmpZone, zone, true) != -1)
return 1;
}
return 0;
}