SA-MP Forums Archive
Square on the map - 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: Square on the map (/showthread.php?tid=332606)



Square on the map - HazardGaming - 08.04.2012

Hello,

How does one simply put a square on the map where a player is with the same color as there name

Eg.
ID 0 is Blue

Where he is , is a square which is blue?

Thanks.

EDIT:
Also, on my Gamemode, it automatically sets adminlevel to 6 to new people, there is nothing on the OnPlayerConnect Callback or OnPlayerSpawn :/


Re: Square on the map - Tee - 08.04.2012

https://sampwiki.blast.hk/wiki/SetPlayerMapIcon

https://sampwiki.blast.hk/wiki/GetPlayerColor

What's your admin variable?


Re: Square on the map - KingHual - 08.04.2012

https://sampwiki.blast.hk/wiki/ShowPlayerMarkers


Re: Square on the map - HazardGaming - 08.04.2012

PlayerInfo[playerid][pAdminLevel]


Re: Square on the map - Tee - 08.04.2012

pawn Код:
public OnPlayerConnect(playerid)
{
    PlayerInfo[playerid][pAdminLevel] = 0;
    return 1;
}
Set the variable to 0 when the player connects.


Re: Square on the map - HazardGaming - 08.04.2012

but when if you set someones admin level to 6 they disconnect and log back in, won't it set it to 0 again?

@King_Haul,
Thats near, I want it so if someone is in LS they can see the square of a player in LV.


Re: Square on the map - Tee - 08.04.2012

That's the idea but if you have a saving and loading system, you'd load the admin level when they Log-in. It's best to assign the null value for all your player variables under the OnPlayerConnect callback.
pawn Код:
ShowPlayerMarkers(1);//This will do the trick
Source: https://sampwiki.blast.hk/wiki/MarkerModes


Re: Square on the map - HazardGaming - 08.04.2012

I don't quite understand you..

+ Yes , so whereever you are is a Square with your color on it.


Re: Square on the map - Tee - 08.04.2012

For the square, do this:

pawn Код:
public OnGameModeInit()
{
    ShowPlayerMarkers(1);// Player markers can be seen by any player, from anywhere in the game.
    return 1;
}
And for the admin level, you'll need to have a register and log-in system (which would most likely come with a saving system)


Re: Square on the map - HazardGaming - 08.04.2012

I do have one, its Y_INI.
Would you beable to have a run through the code through TeamViewer?