SA-MP Forums Archive
Removing Class Selection Buttons with TogglePlayerSpectating - Bug? - 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)
+--- Thread: Removing Class Selection Buttons with TogglePlayerSpectating - Bug? (/showthread.php?tid=291323)



Removing Class Selection Buttons with TogglePlayerSpectating - Bug? - VIRUXE - 19.10.2011

Okay, this was supposed to be a pretty straight forward thing to code, but...

My 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, txtSelectionHelper);
            // Skin Selection
            SetPlayerInterior(playerid, 2);
            SetPlayerPos(playerid, 618.6595,-75.6010,997.9922);
            SetPlayerFacingAngle(playerid, 48.5131);
            SetPlayerCameraPos(playerid, 616.9158,-73.3656,997.9922);
            SetPlayerCameraLookAt(playerid, 618.6595,-75.6010,997.9922);
            //gPlayerCitySelection[playerid] = -1;
        //}
    }
   
    return 1;
}
The result:


And without TogglePlayerSpectating:


I want to remove those god damn buttons!

Can someone help?


Re: Removing Class Selection Buttons with TogglePlayerSpectating - Bug? - aRoach - 19.10.2011

TogglePlayerSpectating(playerid, 0);


Re: Removing Class Selection Buttons with TogglePlayerSpectating - Bug? - VIRUXE - 19.10.2011

...