Help with OnPlayerRequestClass
#1

Well, i'm making a TDM server, first you have to select the team (like grandlarc), then, appears the classes id. What I need, is if you select Team Red, It will only show read team classes(skins), and the same for team blue.
Thanks
Reply
#2

Bump
Reply
#3

Bump
Reply
#4

pawn Код:
public OnPlayerText(playerid, text[])
{
  if(gTeam[playerid] == TEAM_RED)
  {
     new team = gTeam[playerid];
     new PName[MAX_PLAYER_NAME];
     GetPlayerName(playerid, PName, sizeof(PName));
     format(string, sizeof(string), "[Team]: %s: %s", PName, text);
     for(new i=0; i<MAX_PLAYERS; i++)
     {
       if(IsPlayerConnected(i))
       {
       if(gTeam[i] == team)
       {
           SendClientMessage(i, color, string);
       }
    }
}
this want not work, because this is fantasy, but maybe this can help you a little

or try maybe it work
Reply
#5

Quote:
Originally Posted by Silox
pawn Код:
public OnPlayerText(playerid, text[])
{
  if(gTeam[playerid] == TEAM_RED)
  {
     new team = gTeam[playerid];
     new PName[MAX_PLAYER_NAME];
     GetPlayerName(playerid, PName, sizeof(PName));
     format(string, sizeof(string), "[Team]: %s: %s", PName, text);
     for(new i=0; i<MAX_PLAYERS; i++)
     {
       if(IsPlayerConnected(i))
       {
       if(gTeam[i] == team)
       {
           SendClientMessage(i, color, string);
       }
    }
}
this want not work, because this is fantasy, but maybe this can help you a little

or try maybe it work
LOL

BUMP!
Reply
#6

I'm not sure if you can hide other skins, but you can make the other teams skins to not selectable.
If it may help you, i can post here more info.

BUT, when did you think you will define players team?
When you connect to server you see the skins on the server, so how could you set team to team which player wants to play in?
Reply
#7

Quote:
Originally Posted by Johnson_boy
I'm not sure if you can hide other skins, but you can make the other teams skins to not selectable.
If it may help you, i can post here more info.

BUT, when did you think you will define players team?
When you connect to server you see the skins on the server, so how could you set team to team which player wants to play in?
Yea please..
Reply
#8

Do you use gTeam or what as team system?
Reply
#9

Quote:
Originally Posted by Johnson_boy
Do you use gTeam or what as team system?
GetPlayerTeam..
Reply
#10

well grandlarc gamemode has this function , u can look at it and see if u can find anything?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)