Map Icon
#1

Hi
I want to SetPlayerMapIcon for capture zone
when a player come's near capture zone only then he can see that icon.

Is that done like this

Код:
stock IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
    new Float:X, Float:Y, Float:Z;

    GetPlayerPos(playerid, X, Y, Z);
    if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY) {
        return 1;
    }
    return 0;
}
public OnPlayerConnect
   if(IsPlayerInArea(playerid,  Float:MinX, Float:MinY, Float:MaxX, Float:MaxY))
  {
   SetPlayerMapIcon(blah! blah!)
  }
  return 1;
}
or their is another way?
Reply
#2

Have not you read this before ? => https://sampwiki.blast.hk/wiki/SetPlayerMapIcon
pawn Код:
SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markertype, color, style)
Код:
Styles are
0: MAPICON_LOCAL                Display in the player's local area
1: MAPICON_GLOBAL               Display always
2: MAPICON_LOCAL_CHECKPOINT     Display in the player's local area and has a checkpoint marker
3: MAPICON_GLOBAL_CHECKPOINT    Display always and has a checkpoint marker
Reply
#3

thanx man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)