SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 03/02/2012, 10:19 AM   #1
Mr.Carson Clay
Little Clucker
 
Mr.Carson Clay's Avatar
 
Join Date: Feb 2012
Posts: 11
Reputation: 0
Default Disable class selection on GF

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.

Last edited by Mr.Carson Clay; 03/02/2012 at 10:51 AM.
Mr.Carson Clay is offline   Reply With Quote
Old 03/02/2012, 10:21 AM   #2
T0pAz
Guest
 
Posts: n/a
Default Re: Disable class selection on GF

use SpawnPlayer(); after player has passed the tutorial.
  Reply With Quote
Old 03/02/2012, 10:23 AM   #3
Mr.Carson Clay
Little Clucker
 
Mr.Carson Clay's Avatar
 
Join Date: Feb 2012
Posts: 11
Reputation: 0
Default Re: Disable class selection on GF

I tried... Check out the code.
Mr.Carson Clay is offline   Reply With Quote
Old 03/02/2012, 10:25 AM   #4
T0pAz
Guest
 
Posts: n/a
Default Re: Disable class selection on GF

Quote:
Originally Posted by T0pAz View Post
use SpawnPlayer(); after player has passed the tutorial.
Don't use it on OnPlayerRequestClass.
  Reply With Quote
Old 03/02/2012, 10:31 AM   #5
Mr.Carson Clay
Little Clucker
 
Mr.Carson Clay's Avatar
 
Join Date: Feb 2012
Posts: 11
Reputation: 0
Default Re: Disable class selection on GF

But.. I need to disable class selection even if he/she pressed F4 and did /kill...
__________________
Mr.Carson Clay is offline   Reply With Quote
Old 03/02/2012, 10:33 AM   #6
T0pAz
Guest
 
Posts: n/a
Default Re: Disable class selection on GF

Then just return false on OnPlayerRequestClass.
  Reply With Quote
Old 03/02/2012, 10:34 AM   #7
Mr.Carson Clay
Little Clucker
 
Mr.Carson Clay's Avatar
 
Join Date: Feb 2012
Posts: 11
Reputation: 0
Default Re: Disable class selection on GF

Quote:
Originally Posted by T0pAz View Post
use SpawnPlayer(); after player has passed the tutorial.
Not working...
__________________
Mr.Carson Clay is offline   Reply With Quote
Old 03/02/2012, 10:37 AM   #8
T0pAz
Guest
 
Posts: n/a
Default Re: Disable class selection on GF

Quote:
Originally Posted by Mr.Carson Clay View Post
Not working...
What's not working? Seriously I am not a psychic.
  Reply With Quote
Old 03/02/2012, 10:43 AM   #9
Mr.Carson Clay
Little Clucker
 
Mr.Carson Clay's Avatar
 
Join Date: Feb 2012
Posts: 11
Reputation: 0
Default Re: Disable class selection on GF

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

Last edited by Mr.Carson Clay; 03/02/2012 at 11:28 AM.
Mr.Carson Clay is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable class selection TaMeD Help Archive 8 26/06/2011 08:53 AM
disable class selection? HondaCBR Help Archive 6 21/04/2011 11:15 AM
How to disable speach during class selection. Jmarr Help Archive 2 29/08/2010 07:44 AM
Disable Class Selection Antonio [G-RP] Help Archive 10 24/06/2010 05:56 PM
Disable Class selection falor Help Archive 2 21/04/2010 10:32 AM


All times are GMT. The time now is 12:39 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.