SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 06/06/2019, 12:03 PM   #1
CSSDean
Big Clucker
 
CSSDean's Avatar
 
Join Date: Aug 2017
Location: Minha casa.
Posts: 127
Reputation: 1
Default OnPlayerRequestClass e SetupPlayerForClassSelection

Olá,eu gostaria de adicionar o SetupPlayerForClassSelection para que quando o player logasse automaticamente aparecer ele e logo em seguida o SetupPlayerForClassSelection . Porem não consigo coloca-los em ordem,só aparece o "SetupPlayerForClassSelection". Alguém pode me ajudar? Grato!

OnPlayerRequestClass:

PHP Code:
public OnPlayerRequestClass(playeridclassid)
{
TogglePlayerTVScreen(playeridfalse);
if(
classid == || classid == || classid == 2){
Gang[playerid] = MILITARES;
SetPlayerTeam(playerid,1);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~GANG DOS MILITARES~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0x0000FFAA);
armas[playerid] = 3;}
else if(
classid == 3){
TextDrawHideForPlayer(playeridTextdraw15);
Gang[playerid] = PIRATA;
SetPlayerTeam(playerid,2);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~GANG DOS PIRATAS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0x808000AA);
armas[playerid] = 3;}
else if(
classid == || classid == || classid == 6){
Gang[playerid] = BOMBEIROS;
SetPlayerTeam(playerid,3);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS BOMBEIROS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"40003);
SetPlayerColor(playerid0xFF808096);
armas[playerid] = 5;}
else if(
classid == 7){
Gang[playerid] = MANOBRISTA;
SetPlayerTeam(playerid,4);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS MANOBRISTAS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"50003);
SetPlayerColor(playerid0x000B5196);
armas[playerid] = 12;}
else if(
classid == || classid == 9){
Gang[playerid] = CHINES;
SetPlayerTeam(playerid,5);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS CHINESES~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0xFF80FF9E);
armas[playerid] = 5;}
else if(
classid == 10 || classid == 11 || classid == 12){
Gang[playerid] = POLICIAIS;
SetPlayerTeam(playerid,6);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS POLICIAIS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0xFFA500AA);
armas[playerid] = 3;}
else if(
classid == 13 || classid == 14){
Gang[playerid] = BOYZINHOS;
SetPlayerTeam(playerid,7);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS BOYZINHOS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0xAA3333AA);
armas[playerid] = 2;}
else if(
classid == 15){
Gang[playerid] = BOZO;
SetPlayerTeam(playerid,8);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS BOZO JAMES~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0x80FF0096);
armas[playerid] = 1;}
else if(
classid == 16 || classid == 17 || classid == 18 || classid == 19 || classid == 20 || classid == 21){
Gang[playerid] = GROOVER;
SetPlayerTeam(playerid,9);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS GROOVERS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0x008000AA);
armas[playerid] = 11;}
else if(
classid == 22 || classid == 23 || classid == 24){
Gang[playerid] = BALLAS;
SetPlayerTeam(playerid,10);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS BALLAS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0x8000808D);
armas[playerid] = 12;}
else if(
classid == 25 || classid == 26 || classid == 27){
Gang[playerid] = NOIAS;
SetPlayerTeam(playerid,11);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~GANG DOS NOIAS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0x0080C0AA);
armas[playerid] = 8;}
else if(
classid == 28 || classid == 29 || classid == 30){
Gang[playerid] = FRANGOS;
SetPlayerTeam(playerid,12);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS FRANGOS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0xDAA520AA);
armas[playerid] = 6;}
else if(
classid == 31){
Gang[playerid] = BANHISTAS;
SetPlayerTeam(playerid,13);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS BANHISTAS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0x00FF4096);
armas[playerid] = 9;}
else if(
classid == 32){
Gang[playerid] = PILOTOS;
SetPlayerTeam(playerid,14);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS PILOTOS~b~~h~]~n~~r~~h~PRESIONE SHIFT"20003);
SetPlayerColor(playerid0x00FFFF96);
armas[playerid] = 2;}
else if(
classid == 33){
Gang[playerid] = MEDICO;
SetPlayerTeam(playerid,15);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS LUTADORES~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0xFFFFFFAA);
armas[playerid] = 2;}
else if(
classid == 34 || classid == 35){
Gang[playerid] = MAFIOSOS;
SetPlayerTeam(playerid,16);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~MAFIA FORELLI~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0xFF000096);
armas[playerid] = 9;}
else if(
classid == 36 || classid == 37){
Gang[playerid] = JCBRASIL;
SetPlayerTeam(playerid,17);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS SAMPEIROS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0x8B4513AA);
armas[playerid] = 10;}
else if(
classid == 38 || classid == 39 || classid == 40){
Gang[playerid] = VAGOS;
SetPlayerTeam(playerid,18);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS VAGOS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0xFFFF00AA);
armas[playerid] = 12;}
else if(
classid == 41 || classid == 42 || classid == 43 || classid == 44 || classid == 45){
Gang[playerid] = MENDIGOS;
SetPlayerTeam(playerid,19);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS MENDIGOS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0x8080C096);
armas[playerid] = 10;}
else if(
classid == 46 || classid == 47 || classid == 48){
Gang[playerid] = PROSTITUTAS;
SetPlayerTeam(playerid,20);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS PROSTITUTAS~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0xFF00FF56);
armas[playerid] = 9;}
else if(
classid == 49 ||classid == 50){
Gang[playerid] = AGENTES;
SetPlayerTeam(playerid,21);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS AGENTES~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0xC0C0C096);
armas[playerid] = 7;}
else if(
classid == 51){
Gang[playerid] = PADRES;
SetPlayerTeam(playerid,22);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~GANG DOS PADRES~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0xFF800096);
armas[playerid] = 2;}
else if(
classid == 52 || classid == 53){
Gang[playerid] = YAKUZA;
SetPlayerTeam(playerid,23);
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~b~~h~]~w~~h~MAFIA YAKUZA~b~~h~]~n~~r~~h~PRESSIONE SHIFT"20003);
SetPlayerColor(playerid0x80808096);
armas[playerid] = 9;}
//-----------------------------------------------------------------
SetPlayerInterior(playerid,1);
SetPlayerPos(playerid958.9765012144.6125481011.027526);
SetPlayerFacingAngle(playerid178.443405);
SetPlayerCameraLookAt(playerid958.9765012144.6125481011.027526);
SetPlayerCameraPos(playerid958.976501 + (10 floatsin(-178.443405degrees)), 2144.612548 + (10 floatcos(-178.443405degrees)), 1011.027526);
ApplyAnimation(playerid,"PARK","Tai_Chi_Loop",4.0,1,0,0,0,-1);
SetPlayerAttachedObject(playerid,1302810.3, -0.15, -0.030.01200.0);
return 
1;

SetupPlayerForClassSelection:

PHP Code:
public SetupPlayerForClassSelection(playerid)
{
new 
classstatus CallRemoteFunction("ClassPosition""i"playerid);
if(
classstatus != 1){

    new 
cameras random(6);
    switch(
cameras)
    {
        case 
0:
        {
            
InterpolateCameraPos(playerid1659.967773, -2033.977050114.0325391135.730957, -2037.12707572.67008916000);
            
InterpolateCameraLookAt(playerid1655.063720, -2033.958374113.0581581130.767089, -2037.00195372.08285516000);
        }
        case 
1:
        {
             
InterpolateCameraPos(playerid2421.358886, -1913.913940146.0601651440.372314, -948.49298091.52504716000);
            
InterpolateCameraLookAt(playerid2418.880126, -1909.575683145.8725891439.539184, -943.58221491.08848516000);
        }
        case 
2:
        {
            
InterpolateCameraPos(playerid341.452056, -885.602783125.1347802298.640380, -1265.08251962.92158116000);
            
InterpolateCameraLookAt(playerid345.813354, -888.017761124.7515022297.206542, -1260.37207062.05229116000);
        }
        case 
3:
        {
            
InterpolateCameraPos(playerid314.303131, -1381.53186076.2573921310.936767, -1281.29370132.76528116000);
            
InterpolateCameraLookAt(playerid319.224151, -1380.91113275.6262661315.668701, -1281.26733331.15024116000);
        }
        case 
4:
        {
            
InterpolateCameraPos(playerid, -2039.425903138.52647366.198432, -1193.3698731044.919067100.87621316000);
            
InterpolateCameraLookAt(playerid, -2036.099609142.25875866.276123, -1196.7883301041.272460100.74897716000);
        }
        case 
5:
        {
            
InterpolateCameraPos(playerid, -2723.561523, -289.622131156.303756, -2678.7775871387.122802159.65063416000);
            
InterpolateCameraLookAt(playerid, -2723.376953, -284.627075156.427978, -2678.7622071392.122680159.62339716000);
        }
    }
//  CLASS
   /* SetPlayerPos(playerid, player_x,player_y,player_z);
    SetPlayerFacingAngle(playerid, player_angle);
    SetPlayerCameraPos(playerid, camera_x,camera_y,camera_z);
    SetPlayerCameraLookAt(playerid, player_x,player_y,player_z);
    ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing. It's most fitting to the music
    PlayerPlaySound(playerid, 1097,-119.9460,23.1096,12.2238); //music, duh
    //making sure the timer gets executed only once, so the camera doesn't go to fast
    if (PlayerInfo[playerid][SpawnDance]) PlayerInfo[playerid][SpawnTimer] = SetTimerEx("MoveCamera", moving_speed, true, "i", playerid);
    PlayerInfo[playerid][SpawnDance] = false; //preventing the timer to execute again
    return 1;*/
//SetPlayerCameraPos(playerid,1594.5049,607.4824,9.1741);
//SetPlayerCameraLookAt(playerid,1586.5847,607.5907,7.8703);
//ApplyAnimation(playerid, "PARK", "Tai_Chi_Loop", 4.0, 1, 0, 0, 0, 0);
//CreateExplosion(1586.5847,607.5907,7.8703, 12, 20.0);
//ApplyAnimation(playerid, "PARK", "Tai_Chi_Loop", 4.0, 1, 0, 0, 0, 0);

}
TextDrawShowForPlayer(playeridTextdraw5);
TextDrawShowForPlayer(playeridTextdraw6);
TextDrawShowForPlayer(playeridTextdraw7);
TextDrawShowForPlayer(playeridTL1);
TextDrawShowForPlayer(playeridTL2);
TextDrawShowForPlayer(playeridTL3);
//ApplyAnimation(playerid,"DEALER","DEALER_IDLE",4.0,1,0,0,0,0);

Quero que o SetupPlayerForClassSelection aparece primeiro no "Onplayerconnection" pra dps ir pro "OnPlayerRequestClass" Obg a quem ajudar!

PS: Essa é a gm do War em San Fierro peguei pra aprender um pouco.
__________________
BRASIL GUERRA NAS CIDADES v4.3.5 ( 70% )
IP: Em breve!
www.servercss.net
CSSDean is offline   Reply With Quote
Old 07/06/2019, 01:41 PM   #2
CSSDean
Big Clucker
 
CSSDean's Avatar
 
Join Date: Aug 2017
Location: Minha casa.
Posts: 127
Reputation: 1
Default Re: OnPlayerRequestClass e SetupPlayerForClassSelection

alguém? :c
__________________
BRASIL GUERRA NAS CIDADES v4.3.5 ( 70% )
IP: Em breve!
www.servercss.net
CSSDean is offline   Reply With Quote
Old 07/06/2019, 03:25 PM   #3
ipsLuan
High-roller
 
ipsLuan's Avatar
 
Join Date: Feb 2013
Location: Ilhéus, BA
Posts: 4,188
Reputation: 310
Default Re: OnPlayerRequestClass e SetupPlayerForClassSelection

Não consegui entender muito bem o que você quer.

Chame SetupPlayerForClassSelection(playerid); quando for necessário.
__________________
O fim.
ipsLuan is offline   Reply With Quote
Old 08/06/2019, 12:56 PM   #4
CSSDean
Big Clucker
 
CSSDean's Avatar
 
Join Date: Aug 2017
Location: Minha casa.
Posts: 127
Reputation: 1
Default Re: OnPlayerRequestClass e SetupPlayerForClassSelection

Quote:
Originally Posted by ipsLuan View Post
Não consegui entender muito bem o que você quer.

Chame SetupPlayerForClassSelection(playerid); quando for necessário.
Então eu gostaria que aparecesse uma tela antes da seleção de classe,que seria o SetupPlayerForClassSelection(playerid); com a tela de login. Apos o jogador logar,ele seria levado a seleção de classe,onde escolheria sua "gang" para jogar.
__________________
BRASIL GUERRA NAS CIDADES v4.3.5 ( 70% )
IP: Em breve!
www.servercss.net
CSSDean is offline   Reply With Quote
Old 09/06/2019, 11:00 PM   #5
GGsamp
Little Clucker
 
GGsamp's Avatar
 
Join Date: Oct 2018
Posts: 32
Reputation: 0
Default Re: OnPlayerRequestClass e SetupPlayerForClassSelection

Quote:
Originally Posted by CSSDean View Post
Então eu gostaria que aparecesse uma tela antes da seleção de classe,que seria o SetupPlayerForClassSelection(playerid); com a tela de login. Apos o jogador logar,ele seria levado a seleção de classe,onde escolheria sua "gang" para jogar.
BOA SORTE!


ONPLAYERCONNECT

TogglePlayerSpectating(playerid, true); // TRAVAR NO CONNECT

SetTimerEx("MostrarLoginAndRegistro", 2000 , 0 , "i", playerid); // Mostrar login , como se fosse requestclass!


ONPLAYERSPAWN

TogglePlayerSpectating(playerid, true); //DESTRAVAR PLAYER


//SUAS COORDENADAS , NO CASO SUA TELA LOGIN

forward MostrarLoginAndRegistro(playerid);
public MostrarLoginAndRegistro(playerid)
{
SetPlayerTime(playerid,2,0);
SetPlayerInterior(playerid, 14);
InterpolateCameraPos(playerid, -11111.2233344, 1245.071777, 1065.070556, -1459.784545, 1566.071777, 1065.070556, 16000);
InterpolateCameraLookAt(playerid, -1456.123104, 1569.574707, 2345.920776, -1454.407104, 1569.574707, 1063.920776, 16000);

return 1;
}
GGsamp is offline   Reply With Quote
Old 11/06/2019, 02:38 AM   #6
CSSDean
Big Clucker
 
CSSDean's Avatar
 
Join Date: Aug 2017
Location: Minha casa.
Posts: 127
Reputation: 1
Default Re: OnPlayerRequestClass e SetupPlayerForClassSelection

Quote:
Originally Posted by GGsamp View Post
BOA SORTE!


ONPLAYERCONNECT

TogglePlayerSpectating(playerid, true); // TRAVAR NO CONNECT

SetTimerEx("MostrarLoginAndRegistro", 2000 , 0 , "i", playerid); // Mostrar login , como se fosse requestclass!


ONPLAYERSPAWN

TogglePlayerSpectating(playerid, true); //DESTRAVAR PLAYER


//SUAS COORDENADAS , NO CASO SUA TELA LOGIN

forward MostrarLoginAndRegistro(playerid);
public MostrarLoginAndRegistro(playerid)
{
SetPlayerTime(playerid,2,0);
SetPlayerInterior(playerid, 14);
InterpolateCameraPos(playerid, -11111.2233344, 1245.071777, 1065.070556, -1459.784545, 1566.071777, 1065.070556, 16000);
InterpolateCameraLookAt(playerid, -1456.123104, 1569.574707, 2345.920776, -1454.407104, 1569.574707, 1063.920776, 16000);

return 1;
}
obg manolo!
__________________
BRASIL GUERRA NAS CIDADES v4.3.5 ( 70% )
IP: Em breve!
www.servercss.net
CSSDean 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
SetupPlayerForClassSelection(playerid) Areax Scripting Help 5 01/05/2013 03:11 PM
SetupPlayerForClassSelection? Visio Scripting Help 2 24/06/2012 07:40 AM
Help|SetupPlayerForClassSelection DVDXD Help Archive 6 23/06/2011 05:32 PM
NPC get stuck on SetupPlayerForClassSelection/OnPlayerRequestClass BizzyD Help Archive 5 08/04/2011 02:18 PM
SetupPlayerForClassSelection error compiling Angelo94 Help Archive 6 17/10/2009 01:43 PM


All times are GMT. The time now is 10:41 AM.


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