#1

Hello

I have done this and its not working

pawn Код:
forward RankUp(playerid);
public RankUp(playerid)
{
    new tmp[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    if(gTeam[playerid]==TEAM_TEST)
    {
        SetPlayerSkin(playerid, 299);
        SetPlayerColor(playerid, -1);
        format(tmp, sizeof(tmp), "Welcome to Test: %s",PlayerName(playerid));
        SendClientMessageToAll(GetPlayerColor(playerid),tmp);
        return 1;
    }
    return 1;
}
Now if I rank up to that rank, it doesnt send anything, no messages Why?
Reply
#2

Probably happens because you do not applied to the player who comes into gTeam to TEAM_TEST.
Reply
#3

Can you show me please? How to do that?

Because I need to use that alot
Reply
#4

u can use under OnPlayerRequestSpawn :

pawn Код:
if(classid == 1) // change 1 to the class id the test team belong
{
       gTeam[playerid] == TEAM_TEST;
}
Reply
#5

undefined symbol "classid"

Also isnt there an other better way?
Reply
#6

Hm anyone?
Reply
#7

Still need help with this, it doesnt show any messages, I think
cynic is right, but can anyone make that code, thanks
Reply
#8

pawn Код:
new gClassid[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
  gClassid[playerid] = classid;
  return 1;
}

public OnPlayerRequestSpawn(playerid)
{
  if(gClassid[playerid] == 1) // change 1 to the class id the test team belong
  {
       gTeam[playerid] = TEAM_TEST;
  }
  return 1;
}
Reply
#9

Thanks Sascha, but what should I add in the public RankUp because its not working if I just add that what you posted
Reply
#10

try to change "SetPlayerColor(playerid, -1)" to a valid color code...
Click here to see a list of the hex color codes..

just remove the "#" infront of it and add a "0x" infront of the number that this website will return.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)