[HELP]Moving map icon
#1

How can this?


/imageshack/i/samp100rl.png/
Reply
#2

I made it like a command.

On top
pawn Code:
new MapIcon[MAX_PLAYERS];
Command:
pawn Code:
COMMAND:mapicon(playerid, params[])
{
    if(MapIcon[playerid] == 0)
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X,Y,Z);
        SetPlayerMapIcon(playerid, 99,X,Y,Z,55,0,MAPICON_LOCAL);
        MapIcon[playerid] = 1;
        SendClientMessage(playerid, 0xFFFFFFFF, "Your map icon is now on.");
    }
    else
    {
        RemovePlayerMapIcon(playerid, 99);
        MapIcon[playerid] = 0;
        SendClientMessage(playerid, 0xFFFFFFFF, "Your map icon is now off.");
    }
    return 1;
}
OnPlayerUpdate:
pawn Code:
public OnPlayerUpdate(playerid)
{
    if(MapIcon[playerid] == 1)
    {
        RemovePlayerMapIcon(playerid, 99);
        new Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid,X,Y,Z);
        SetPlayerMapIcon(playerid, 99,X,Y,Z,55,0,MAPICON_LOCAL);
    }
    return 1;
}
Reply
#3

Very thank's
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)