How to remove this ? -
Zeromanster - 11.10.2009
I don't want this buttons since i don't have class selection, so could you tell my how to remove them ?
Thank you.
Re: How to remove this ? -
dugi - 11.10.2009
It was answered many times, search.
Re: How to remove this ? -
eminich - 11.10.2009
put player in spectate mode then spawn him turn spectate mode off and spawn him again thats how i get it to work
Re: How to remove this ? -
tony_fitto - 15.10.2009
Then we have the same question i hate this buttons to.
Re: How to remove this ? -
mprofitt - 05.11.2009
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
Re: How to remove this ? -
Jose 510 - 05.11.2009
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)"?
Re: How to remove this ? -
UberSocks - 05.11.2009
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.
Re: How to remove this ? -
tony_fitto - 05.11.2009
Код:
TextDrawHideForPlayer(playerid,txtClassSelHelper);
I Don't realy understand what "txtClassSelHelper" but does it work ??
Re: How to remove this ? -
Jose 510 - 05.11.2009
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?
Re: How to remove this ? -
Jose 510 - 05.11.2009
Anyone?