SA-MP Forums Archive
Help me with showing the GameText - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help me with showing the GameText (/showthread.php?tid=145655)



Help me with showing the GameText - juuleman - 03.05.2010

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.


Re: Help me with showing the GameText - johnnyc - 03.05.2010

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)


Re: Help me with showing the GameText - Desert - 03.05.2010

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


Re: Help me with showing the GameText - juuleman - 03.05.2010

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