SA-MP Forums Archive
[Help]Markers - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help]Markers (/showthread.php?tid=228803)



[Help]Markers - =WoR=Bruno - 20.02.2011

Ok,i did this:

Code:
public OnPlayerSpawn(playerid)
{
    SetPlayerColor(playerid, WHITE);

	if(Player[playerid][Authenticated] == 1)
	{
        if(Player[playerid][Group] == 1)
		{
			if(Player[playerid][CopDuty] == 1)
  			{
    			SetPlayerColor(playerid, WHITE);
  			}
   			else
    		{
          		SetPlayerColor(playerid, BLUE);
		}

	    if(Player[playerid][Group] == 4)
		{
			SetPlayerColor(playerid, RED);
		}
	
		if(Player[playerid][Group] == 6)
		{
			SetPlayerColor(playerid, PURPLE);
		}
		
		if(Player[playerid][Group] == 8)
		{
			SetPlayerColor(playerid, GREEN);
		}
		
        if(Player[playerid][Group] == 12)
		{
			SetPlayerColor(playerid, YELLOW);
		}
		
		if(Player[playerid][Group] == 7)
		{
			SetPlayerColor(playerid, AQUAGREEN);
		}
	}
But when they die the color reset to white...didnt find out yet why xD

Can someone give some tips?


Re: [Help]Markers - MadeMan - 20.02.2011

pawn Code:
if(Player[playerid][Group] == 1)
{
    if(Player[playerid][CopDuty] == 1)
    {
        SetPlayerColor(playerid, WHITE);
    }
    else
    {
        SetPlayerColor(playerid, BLUE);
}

if(Player[playerid][Group] == 4)
{
    SetPlayerColor(playerid, RED);
}
You have a bracket missing

pawn Code:
if(Player[playerid][Group] == 1)
{
    if(Player[playerid][CopDuty] == 1)
    {
        SetPlayerColor(playerid, WHITE);
    }
    else
    {
        SetPlayerColor(playerid, BLUE);
    } // here
}

if(Player[playerid][Group] == 4)
{
    SetPlayerColor(playerid, RED);
}



Re: [Help]Markers - =WoR=Bruno - 20.02.2011

its there on the gamemode.i copy/paste failed xD...so its not that the problem...