SA-MP Forums Archive
Disable class selection on GF - 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: Disable class selection on GF (/showthread.php?tid=315446)



Disable class selection on GF - Mr.Carson Clay - 03.02.2012

Hello guyz,
I want some help with the GodFather script. When I use SpawnPlayer with OnPlayerRequestClass it shows the NEXT PREVIOUS SPAWN thing.. I need to press SPAWN button to spawn. . Please help me out.
pawn Code:
public OnPlayerRequestClass(playerid, classid)
{

    if(IsPlayerNPC(playerid)) return 1;

    SetupPlayerForClassSelection(playerid);
    if(gPlayerSpawned[playerid] == 1)
    {
        if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0 || PlayerInfo[playerid][pFMember] != 255)
        {
            SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
        }
        else
        {
            PlayerInfo[playerid][pModel] = PedSkins[classid][0];
        }
    }
    else
    {
        SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
    }

    SpawnPlayer(playerid);
    return 1;
}

public SetupPlayerForClassSelection(playerid)
{
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,-1657.5237,1207.6644,13.6719);
    SetPlayerFacingAngle(playerid,357.6906);
    SetPlayerCameraPos(playerid, -1657.4678,1211.2292,13.6781);
    SetPlayerCameraLookAt(playerid,-1657.5237,1207.6644,13.6719);
    return 1;
}
I tried commenting the SetupPlayerForClassSelection. When I did that, it doesn't show any classes but.. I need to press SPAWN.


Re: Disable class selection on GF - T0pAz - 03.02.2012

use SpawnPlayer(); after player has passed the tutorial.


Re: Disable class selection on GF - Mr.Carson Clay - 03.02.2012

I tried... Check out the code.


Re: Disable class selection on GF - T0pAz - 03.02.2012

Quote:
Originally Posted by T0pAz
View Post
use SpawnPlayer(); after player has passed the tutorial.
Don't use it on OnPlayerRequestClass.


Re: Disable class selection on GF - Mr.Carson Clay - 03.02.2012

But.. I need to disable class selection even if he/she pressed F4 and did /kill...


Re: Disable class selection on GF - T0pAz - 03.02.2012

Then just return false on OnPlayerRequestClass.


Re: Disable class selection on GF - Mr.Carson Clay - 03.02.2012

Quote:
Originally Posted by T0pAz
View Post
use SpawnPlayer(); after player has passed the tutorial.
Not working...


Re: Disable class selection on GF - T0pAz - 03.02.2012

Quote:
Originally Posted by Mr.Carson Clay
View Post
Not working...
What's not working? Seriously I am not a psychic.


Re: Disable class selection on GF - Mr.Carson Clay - 03.02.2012

SOLVED
Please close this thread. The problem was I needed to use
pawn Code:
SetSpawnInfo
.