[HELP] Class Selection - Showing the class name?
#1

Yo, I made a class selection for a mod I'm scripting. I must say I suck at this, but I'm really up for learning it, started today.

So, the class selection works fine and all, but I'd like at least two lines of text to display above the head or to the side of the class when it is selected.

Like,

|
| MERCENARIES
| Soldier
| o
| -|-
| /\
|

Showing both the team (Mercenaries) and the specific class name (Soldier).

I will put my code in here as well.

Code:
public OnPlayerRequestClass(playerid, classid)
{
  SetPlayerTeamFromClass(playerid, classid);
	SetPlayerPos(playerid, 877.9190,-1077.0901,24.5843);
	SetPlayerFacingAngle(playerid, 360.0000);
	SetPlayerCameraPos(playerid, 877.9275,-1072.0787,24.3923);
	SetPlayerCameraLookAt(playerid, 877.9190,-1077.0901,24.5843);
	return 1;
}
Please, anyone? A Dialogue box is what I assume I am going to use, but don't know how.
Reply
#2

so get the class id and use gametext and i believe you can do Mercenary /n Soldier look this up in samp wiki
Reply
#3

I couldn't find this in samp wiki....

But maybe I fail at looking.

If someone could give me an example code, I'll give you a cookie
Reply
#4

*Sigh* I'd really like some help here, and all the pro's who can do it, spend those 5 mins telling me how to please
Reply
#5

Hey, instead of making a post myself im sharing yours.
i did that SetPlayerTeamFromClass
and if u just add game text for some reason it comes a few second of having my player and leaves alot after i changed player if im flickin fast. So if someone could please help both of us. It must be a easy script for some of you just adding game text, to somewhere classid thingy.

Thanks,
Ray
Reply
#6

Example
Code:
public OnPlayerRequestClass(playerid, classid)
{


      SetPlayerTeamFromClass(playerid, classid);
      SetPlayerPos(playerid, 877.9190,-1077.0901,24.5843);
	SetPlayerFacingAngle(playerid, 360.0000);
	SetPlayerCameraPos(playerid, 877.9275,-1072.0787,24.3923);
	SetPlayerCameraLookAt(playerid, 877.9190,-1077.0901,24.5843);
    new skinid = GetPlayerSkin(playerid);
	  switch(skinid)
	  {
	  case 280:
	  {
			GameTextForPlayer(playerid,"~b~ Police",2000,6);
			gPlayer[playerid][teamid] = TEAM_POLICE;
	  }
	  case 281:
	  {
			GameTextForPlayer(playerid,"~b~ Police",2000,6);
			gPlayer[playerid][teamid] = TEAM_POLICE;

	  }
	  case 282:
	  {
			GameTextForPlayer(playerid,"~b~ Police",2000,6);
			gPlayer[playerid][teamid] = TEAM_POLICE;
	  }
    }
    return 1;
    }
Reply
#7

Thank You so much
Reply
#8

One More Question, How would u make like The Skin For millionaires only?
would i do?
Code:
switch(skinid)
{
case280
{
     if(GetPlayerMoney(playerid) == 1000000)
     GameTextForPlayer(playerid, "Admins Only", 2000, 6)
}
Reply
#9

anyone?
Reply
#10

Quote:
Originally Posted by bluray
View Post
One More Question, How would u make like The Skin For millionaires only?
would i do?
Code:
switch(skinid)
{
case280
{
     if(GetPlayerMoney(playerid) == 1000000)
     GameTextForPlayer(playerid, "Admins Only", 2000, 6)
}
This will not work for only millionaires. Because they can still select the skin!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)