PDA

View Full Version : Color marker


iBots
14/04/2014, 11:06 PM
i have made a small thing which is if you are in a faction and another one in the same faction you see a blue marker on him,but it doesnt work...
here is the code:

public OnPlayerStreamIn(playerid, forplayerid)
{
if(pInfo[playerid][Faction] == pInfo[forplayerid][Faction]) SetPlayerMarkerForPlayer(playerid, forplayerid, COLOR_BLUE);
return 1;
}

and i got in the script

ShowPlayerMarkers(1);

why doesnt it work?

Bingo
14/04/2014, 11:18 PM
public OnPlayerStreamIn(playerid, forplayerid)
{
if(pInfo[playerid][Faction] == pInfo[forplayerid][Faction]) //Maybe this would work? I guess maybe i am missing bracket but don't know where.
SetPlayerMarkerForPlayer(playerid, forplayerid, COLOR_BLUE);
return 1;
}


Try now.

iBots
16/04/2014, 12:55 AM
Anyone?

Dignity
16/04/2014, 01:27 AM
Did you try switching up the params?

(playerid, forplayerid) to (forplayerid, playerid)? It could be that. Also, try defining "pInfo[forplayerid][Faction]" to something. Like this:


new forpid = pInfo[forplayerid][Faction];

if(pInfo[playerid][Faction] == forpid)