SetPlayerMapIcon in OnPlayerUpdate? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SetPlayerMapIcon in OnPlayerUpdate? (
/showthread.php?tid=582800)
SetPlayerMapIcon in OnPlayerUpdate? -
Metharon - 23.07.2015
I want to make the player map icon with the position of hiis love..
pawn Код:
if(PlayerInfo[playerid][pMarried] != 0)
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(!strcmp(GetName(i), PlayerInfo[playerid][pMarriedTo]))
{
new Float: x,
Float: y,
Float: z;
GetPlayerPos(i, x,y,z);
SetPlayerMapIcon(playerid, 210, x,y,z, 21 , 0 , MAPICON_GLOBAL); //marriage ls
}
}
}
But is not working , why ?
I want
Player 1 to see
Player 2 as a heart on map .
AW: SetPlayerMapIcon in OnPlayerUpdate? -
Mencent - 23.07.2015
Hello!
PlayerInfo[playerid][pMarriedTo] => PlayerInfo[i][pMarriedTo]
PHP код:
if(PlayerInfo[playerid][pMarried] != 0)
{
new Float:x,Float:y,Float:z;
for(new i;i<MAX_PLAYERS;i++)
{
if(!strcmp(GetName(i),PlayerInfo[i][pMarriedTo]))
{
GetPlayerPos(i,x,y,z);
SetPlayerMapIcon(playerid,210,x,y,z,21,0,MAPICON_GLOBAL);
}
}
}
Try this.
- Mencent