Help CreateDynamicMapIcon
#1

hey i have problem about that , the cmd working good , but how to make the icon removed when player in that position , when i type /showteam to player , and icon showing , but when i type /showteam again the last icon not removed it still showing , i just want when player /showteam again the last icon will removed and recreate new icon
this my script :
pawn Код:
dcmd_showteam(playerid, params[])
{
    new giveplayerid;
    #pragma unused params
    if(sscanf(params, "d", giveplayerid)) return SendClientMessage(playerid, COLOR_BLUE, "[USAGE]: /showteam [playerid]");
    if(!IsPlayerConnected(giveplayerid)) {
        return SendClientMessage(playerid, COLOR_BLUE, "Player invalid.");
   }
    else
    {
        new Float:plocx,Float:plocy,Float:plocz;
        GetPlayerPos(giveplayerid, plocx, plocy, plocz);
        CreateDynamicMapIcon(plocx, plocy,  plocz, 41, 0, 0, 0, -1, 500.0);
        SendClientMessage(playerid, COLOR_BLUE, "Player showing on you radar.");
    }
    return 1;
}
and this SS


Sorry for my bad english
Thanks rep++ for helped
Reply
#2

Why not just make a timer to remove all the icons for the player then essentially 'refresh' it and send the command again.
Reply
#3

i dont know how . please help me
Reply
#4

https://sampwiki.blast.hk/wiki/SetPlayerMapIcon
https://sampwiki.blast.hk/wiki/RemovePlayerMapIcon
Reply
#5

and how to make it remove and recreate map icon ?
Reply
#6

https://sampwiki.blast.hk/wiki/SetTimerEx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)