Need Some Help.
#1

On The Skin Selection Spawn thing I want it to say the name of the team the player belongs to. There are two Skins and there are two Teams Army Guy Belongs In Army And FBI Guy Belongs In FBI.

But i want it to be Labeled So Some people dont freak out and wonder which team is which (Just To Make It Showable) I have added Pictures Of what im talking about




Reply
#2

It depends on the order of which you added the characters (AddPlayerClass lines) to the script. For example, if the Army is your first AddPlayerClass line, you could use the following code:
pawn Код:
public OnPlayerRequestClass( playerid, classid ) {

   switch( classid ) {

      case 0: GameTextForPlayer( playerid, "~g~Army", 4000, 5 );
      case 1: GameTextForPlayer( playerid, "~b~FBI", 4000, 5 );
   }
   return 1;
}
A couple notable links to look at:

OnPlayerRequestClass callback - This function is called when the player enters class selection and each time they press a button while in class selection
GameTextForPlayer function - Displays game text to the player's screen

If you need a little explanation on any of the above code, please ask. It's always better to understand the code than to just plug it into your script.

As an alternative, you could also use GetPlayerSkin() to compare the skin, and then display the game text. However, that would be slightly less efficient.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)