15.01.2011, 21:01
[HELP]Moving map icon
15.01.2011, 22:18
I made it like a command.
On top
Command:
OnPlayerUpdate:
On top
pawn Code:
new MapIcon[MAX_PLAYERS];
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;
}
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;
}
16.01.2011, 15:58
Very thank's
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)