How to remove this ?
#1



I don't want this buttons since i don't have class selection, so could you tell my how to remove them ?

Thank you.
Reply
#2

It was answered many times, search.
Reply
#3

put player in spectate mode then spawn him turn spectate mode off and spawn him again thats how i get it to work
Reply
#4

Then we have the same question i hate this buttons to.
Reply
#5

I ended up at this thread as well seeking the same answer.

Found the answer in this thread...
http://forum.sa-mp.com/index.php?topic=125726.0
Reply
#6

Well I found this on the grand larceny file:

Код:
TextDrawHideForPlayer(playerid,txtClassSelHelper);
Do I add this under:

Код:
public OnPlayerRequestClass(playerid, classid)
?

And if so, is it "(playerid,txtClassSelHelper)" or just "(playerid)"?
Reply
#7

Quote:
Originally Posted by Jose_510
Well I found this on the grand larceny file:

Код:
TextDrawHideForPlayer(playerid,txtClassSelHelper);
Do I add this under:

Код:
public OnPlayerRequestClass(playerid, classid)
?

And if so, is it "(playerid,txtClassSelHelper)" or just "(playerid)"?
Have a look at the following code:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerNPC(playerid)) return 1;

    if(gPlayerHasCitySelected[playerid]) {
        ClassSel_SetupCharSelection(playerid);
        return 1;
    } else {
        if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
            TogglePlayerSpectating(playerid,1);
        TextDrawShowForPlayer(playerid, txtClassSelHelper);
        gPlayerCitySelection[playerid] = -1;
        }
    }
 
    return 0;
}
The following part:

pawn Код:
if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
            TogglePlayerSpectating(playerid,1);
        TextDrawShowForPlayer(playerid, txtClassSelHelper);
        gPlayerCitySelection[playerid] = -1;
        }
    }
.. indicates that the player is toggled to spectating mode, avoiding the arrows and spawn button (as I believe this is how it works, I haven't tried it). In order for the buttons to be hidden, you will need to set the players to spectating; refer to the above code. As for your question, txtClassSelHelper refers to a text draw which is created when selecting a city (in the Grand Larceny gamemode).

Код:
txtClassSelHelper = TextDrawCreate(10.0, 415.0, " Press ~b~~k~~GO_LEFT~ ~w~or ~b~~k~~GO_RIGHT~ ~w~to switch cities.~n~ Press ~r~~k~~PED_FIREWEAPON~ ~w~to select.");
If you were to add:

Код:
TextDrawHideForPlayer(playerid,txtClassSelHelper);
.. all this would simply do is hide the textdraw which is named txtClassSelHelper, not the arrows and spawn button.
Reply
#8

Код:
TextDrawHideForPlayer(playerid,txtClassSelHelper);
I Don't realy understand what "txtClassSelHelper" but does it work ??
Reply
#9

Quote:
Originally Posted by UberSocks
Quote:
Originally Posted by Jose_510
Well I found this on the grand larceny file:

Код:
TextDrawHideForPlayer(playerid,txtClassSelHelper);
Do I add this under:

Код:
public OnPlayerRequestClass(playerid, classid)
?

And if so, is it "(playerid,txtClassSelHelper)" or just "(playerid)"?
Have a look at the following code:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerNPC(playerid)) return 1;

    if(gPlayerHasCitySelected[playerid]) {
        ClassSel_SetupCharSelection(playerid);
        return 1;
    } else {
        if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
            TogglePlayerSpectating(playerid,1);
        TextDrawShowForPlayer(playerid, txtClassSelHelper);
        gPlayerCitySelection[playerid] = -1;
        }
    }
 
    return 0;
}
The following part:

pawn Код:
if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
            TogglePlayerSpectating(playerid,1);
        TextDrawShowForPlayer(playerid, txtClassSelHelper);
        gPlayerCitySelection[playerid] = -1;
        }
    }
.. indicates that the player is toggled to spectating mode, avoiding the arrows and spawn button (as I believe this is how it works, I haven't tried it). In order for the buttons to be hidden, you will need to set the players to spectating; refer to the above code. As for your question, txtClassSelHelper refers to a text draw which is created when selecting a city (in the Grand Larceny gamemode).

Код:
txtClassSelHelper = TextDrawCreate(10.0, 415.0, " Press ~b~~k~~GO_LEFT~ ~w~or ~b~~k~~GO_RIGHT~ ~w~to switch cities.~n~ Press ~r~~k~~PED_FIREWEAPON~ ~w~to select.");
If you were to add:

Код:
TextDrawHideForPlayer(playerid,txtClassSelHelper);
.. all this would simply do is hide the textdraw which is named txtClassSelHelper, not the arrows and spawn button.
Ok I was able to remove the arrows and crap, but when I spawn I am still in spectate mode, how to disable that?
Reply
#10

Anyone?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)