Color marker - 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: Color marker (
/showthread.php?tid=506867)
Color marker -
iBots - 14.04.2014
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:
pawn Код:
public OnPlayerStreamIn(playerid, forplayerid)
{
if(pInfo[playerid][Faction] == pInfo[forplayerid][Faction]) SetPlayerMarkerForPlayer(playerid, forplayerid, COLOR_BLUE);
return 1;
}
and i got in the script
why doesnt it work?
Re: Color marker -
Bingo - 14.04.2014
pawn Код:
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.
Re: Color marker -
iBots - 15.04.2014
Anyone?
Re: Color marker -
Dignity - 16.04.2014
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:
pawn Код:
new forpid = pInfo[forplayerid][Faction];
if(pInfo[playerid][Faction] == forpid)