Help me with showing the GameText
#1

Hey Guys,

I got this:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    new string[128];
    if(classid == 180)
    {
      format(string, sizeof(string), "~g~Team Green~n~~r~Defenders");
        GameTextForPlayer(playerid,string,3500,6);
    }
    else if(classid == 174)
    {
        format(string, sizeof(string), "~r~Team Red~n~~r~Attackers");
        GameTextForPlayer(playerid,string,3500,6);
    }
  SetPlayerPos(playerid, 1524.4070, -883.0510, 61.1224);
  SetPlayerCameraPos(playerid, 1530.9668, -889.9349, 61.1226);
  SetPlayerCameraLookAt(playerid, 1524.4070, -883.0510, 61.1224);
    return 1;
}
But the GameText isnt there when im choosing a skin...

Plz help.
Reply
#2

Try this
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    new string[128];
    if(classid >= 180)
    {
      format(string, sizeof(string), "~g~Team Green~n~~r~Defenders");
        GameTextForPlayer(playerid,string,3500,6);
    }
    else if(classid >= 174)
    {
        format(string, sizeof(string), "~r~Team Red~n~~r~Attackers");
        GameTextForPlayer(playerid,string,3500,6);
    return 1;
}
and these
Код:
  SetPlayerPos(playerid, 1524.4070, -883.0510, 61.1224);
  SetPlayerCameraPos(playerid, 1530.9668, -889.9349, 61.1226);
  SetPlayerCameraLookAt(playerid, 1524.4070, -883.0510, 61.1224);
add them on SetupPlayerForClassSelection(playerid)
Reply
#3

Does your script only contain these 2 skins?

Couse it's a common mistake to think classid is the same as skinid

The first skin you add under ongamemodeinnit is classid 0 on selection. Second is 1
Reply
#4

Quote:
Originally Posted by Desert
Does your script only contain these 2 skins?

Couse it's a common mistake to think classid is the same as skinid

The first skin you add under ongamemodeinnit is classid 0 on selection. Second is 1
Thanks man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)