SA-MP Forums Archive
unit names? - 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: unit names? (/showthread.php?tid=576896)



unit names? - alexanderjb918 - 07.06.2015

Okay I want to code unit names so this is my code so far

Код:
new UnitNames[28][30] = {
{"Sam 10"},
{"Sam 20"},
{"Sam 30"},
{"Sam 40"},
{"Adam 1"},
{"Adam 2"},
{"Adam 3"},
{"Adam 4"},
{"Adam 5"},
{"Adam 6"},
{"Adam 7"},
{"Adam 8"},
{"Bravo 1"},
{"Bravo 2"},
{"Bravo 3"},
{"Edward 1"},
{"Tac 1"},
{"Tac 2"},
{"Charles 1"},
{"Charles 2"},
{"Chares 3"},
{"Victor 1"},
{"Victor 2"},
{"Victor 3"},
{"November 1"},
{"November 2"},
{"November 3"},
{"Sting"}};

Код:
COMMAND:unit(playerid, params[])
{
	new string[1024];
   	for(new h = 0; h < sizeof(UnitNames); h++)
	{
	    if(h == 0)
	    {
		    format(string, sizeof(string),"%s", UnitNames[h][0]);
		}
		else
		{
		    format(string, sizeof(string),"%s\n%s", string, UnitNames[h][0]);
	    }
	}
	ShowPlayerDialog(playerid,126,DIALOG_STYLE_LIST,"Police Radio Units",string,"Select", "Close");
	return 1;
}
I wan't to make it so when a player enters a vehicle it attaches what the players call-sigh is Attach3DTextLabelToVehicle with the unit names


Re: unit names? - Sithis - 07.06.2015

And you expect us to do what, exactly? The "Looking for scripters/helpers?"-thread and the "Little coding questions"-thread are there for a reason.


Re: unit names? - alexanderjb918 - 07.06.2015

Well maybe give me some suggestions on what I should do..