Square on the map
#1

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 :/
Reply
#2

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

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

What's your admin variable?
Reply
#3

https://sampwiki.blast.hk/wiki/ShowPlayerMarkers
Reply
#4

PlayerInfo[playerid][pAdminLevel]
Reply
#5

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

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.
Reply
#7

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
Reply
#8

I don't quite understand you..

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

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)
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)