Disable class selection on GF
#1

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.
Reply
#2

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

I tried... Check out the code.
Reply
#4

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

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

Then just return false on OnPlayerRequestClass.
Reply
#7

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)