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?