SetPlayerMapIcon in OnPlayerUpdate?
#1

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 .
Reply
#2

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)