SA-MP Forums Archive
[UNSOLVED]Gang Names under class selection? - 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: [UNSOLVED]Gang Names under class selection? (/showthread.php?tid=105866)



[UNSOLVED]Gang Names under class selection? - Nameless303 - 31.10.2009

Gang Names Under Class Selection? How can I do it with gametexts?

Ty.


EDIT: I tried this;
Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetupPlayerForClassSelection(playerid);

	if(classid == 105 || classid == 106 || classid == 107) {
		GameTextForPlayer(playerid,"~g~Army",5000,5);
	} else if(classid == 102 || classid == 103 || classid == 104) {
	  GameTextForPlayer(playerid,"~r~Terrorists",5000,5);
	}
	
	return 1;
}

public SetupPlayerForClassSelection(playerid)
{
 	SetPlayerInterior(playerid,14);
	SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
	SetPlayerFacingAngle(playerid, 270.0);
	SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
	SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
But it doesn't works; HELP...


Re: Gang Names under class selection? - MrXavier - 31.10.2009

If you mean to have text like "grove street" pop up when selecting a class, this is it. This gives you two slots for gang names.


Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetupPlayerForClassSelection(playerid);
	SetPlayerTeamFromClass(playerid,classid);

	if(classid == 0 || classid == 1) {
		GameTextForPlayer(playerid,"~g~TEAM ~w~ONE",1000,5);
	} else if(classid == 2 || classid == 3) {
	  GameTextForPlayer(playerid,"~r~TEAM ~w~TWO",1000,5);
	}


	return 1;
}



Re: Gang Names under class selection? - MrXavier - 31.10.2009

thats the most basic I can get it. Tell me if you want a certain few names, and I will script it for ya.


Re: Gang Names under class selection? - Nameless303 - 31.10.2009

Quote:
Originally Posted by MrXavier
thats the most basic I can get it. Tell me if you want a certain few names, and I will script it for ya.
Thank you, it worked great! (:


Re: Gang Names under class selection? - Nameless303 - 31.10.2009

Quote:
Originally Posted by Nameless303
Quote:
Originally Posted by MrXavier
thats the most basic I can get it. Tell me if you want a certain few names, and I will script it for ya.
Thank you, it worked great! (:
The first time I tried it, it worked, but now it doesn't shows anything...

Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetupPlayerForClassSelection(playerid);

	if(classid == 105 || classid == 106 || classid == 107) {
		GameTextForPlayer(playerid,"~g~Army",5000,5);
	} else if(classid == 102 || classid == 103 || classid == 104) {
	  GameTextForPlayer(playerid,"~r~Terrorists",5000,5);
	}
	
	return 1;
}

public SetupPlayerForClassSelection(playerid)
{
 	SetPlayerInterior(playerid,14);
	SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
	SetPlayerFacingAngle(playerid, 270.0);
	SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
	SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
It doesn't gives errors but ingame it doesn't shows. ;s