[Ajuda] Nome ao escolhe classe
#1

Olб, gostaria de saber como faзo para aparecer o nome de cada classe ao o player escolher... por um tempo de 3 segundos

Код:
public OnGameModeInit()
{

    UsePlayerPedAnims(); /* Para Correr */

    DisableInteriorEnterExits(); /* Desativando Interiores */

    AddPlayerClass(105,2517.8335,-1676.8845,14.2800,62.7035,0,0,0,0,0,0); // SKIN GROOVE
    AddPlayerClass(106,2517.8335,-1676.8845,14.2800,62.7035,0,0,0,0,0,0); // SKIN GROOVE
    AddPlayerClass(107,2517.8335,-1676.8845,14.2800,62.7035,0,0,0,0,0,0); // SKIN GROOVE


    AddPlayerClass(102,2216.3179,-1343.0271,23.9839,172.6466,0,0,0,0,0,0); // BALLAS
    AddPlayerClass(103,2216.3179,-1343.0271,23.9839,172.6466,0,0,0,0,0,0); // BALLAS
    AddPlayerClass(104,2216.3179,-1343.0271,23.9839,172.6466,0,0,0,0,0,0); // BALLAS


    AddPlayerClass(108,2790.8638,-2008.2262,13.5547,267.1283,0,0,0,0,0,0); // VAGOS
    AddPlayerClass(109,2790.8638,-2008.2262,13.5547,267.1283,0,0,0,0,0,0); // VAGOS
    AddPlayerClass(110,2790.8638,-2008.2262,13.5547,267.1283,0,0,0,0,0,0); // VAGOS


    AddPlayerClass(280,1544.6368,-1631.8610,13.3828,269.2735,0,0,0,0,0,0); // POLICIA
    AddPlayerClass(283,1544.6368,-1631.8610,13.3828,269.2735,0,0,0,0,0,0); // POLICIA
    AddPlayerClass(285,1544.6368,-1631.8610,13.3828,269.2735,0,0,0,0,0,0); // POLICIA


    AddPlayerClass(29,1273.0085,-827.1713,83.2008,222.9273,0,0,0,0,0,0); // ANONYMOUS
    AddPlayerClass(259,1273.0085,-827.1713,83.2008,222.9273,0,0,0,0,0,0); // ANONYMOUS
    AddPlayerClass(289,1273.0085,-827.1713,83.2008,222.9273,0,0,0,0,0,0); // ANONYMOUS
Код:
public OnPlayerRequestClass(playerid, classid)
{
    TextDrawHideForPlayer(playerid, Textdraw0);
    SetPlayerPos(playerid, 1026.3941, -2181.1584, 40.8012);
    SetPlayerInterior(playerid, 0);
    SetPlayerFacingAngle(playerid, 1.6982);
    SetPlayerCameraPos(playerid, 1022.8941, -2177.1584, 42.3012);
    SetPlayerCameraLookAt(playerid, 1027.0232, -2179.7837, 40.4760);
    ApplyAnimation(playerid,"DANCING","DAN_LOOP_A",4.0,1,0,0,0,-1);
    return 1;
}
Reply
#2

la na public:
PHP код:
public OnPlayerRequestClass(playeridclassid
adicione:
PHP код:
switch(classid)
    {
        case 
.. 2:
        {
            
GameTextForPlayer(playerid"Groove Street"30004);
        }
    } 
Reply
#3

matheus, no caso seria para as 5 classes e como defino a frase para tal classe ?
Reply
#4

Cara, para de fazer double-post! Usa o botгo editar. '-'

//Topo do gm
Код:
#define GROVE     0
#define BALLAS    1
#define VAGOS     2
#define POLICIA   3
#define ANONYMOUS 4

new Classe[MAX_PLAYERS];
new PlayerClasse[MAX_PLAYERS];
No OnPlayerRequestClass(playerid, classid)

Код:
PlayerClasse[playerid] = classid; //para definir a classe

switch (classid)
{
    case 0, 1, 2:// (A SKIN 1 2 E 3 VAO SER GROVE "classe 0")
    {
        Classe[playerid] = GROVE;
        GameTextForPlayer(playerid, "~g~GROVE", 1000, 6);
    }
    case 3, 4, 5:
    {
        Classe[playerid] = BALLAS;
        GameTextForPlayer(playerid, "~g~BALLAS ", 1000, 6);
    }
    case 6, 7, 8:
    {
        Classe[playerid] = VAGOS;
        GameTextForPlayer(playerid, "~g~VAGOS", 1000, 6);
    }
    case 9, 10, 11:
    {
        Classe[playerid] = POLICIA;
        GameTextForPlayer(playerid, "~g~POLICIA", 1000, 6);
    }
    case 12, 13, 14:
    {
        Classe[playerid] = ANONYMOUS;
        GameTextForPlayer(playerid, "~g~ANONYMOUS", 1000, 6);
    }
}
/
Acho que й assim. *Nгo teste*.
Aperfeiзoe do seu jeito.

Se nгo funcionar, fale que eu ajudo.




AJUDEI DA +REP
Reply
#5

Irei testar e volto para dizer se deu certo amigo!
Reply
#6

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
TextDrawHideForPlayer(playeridTextdraw0);
    
SetPlayerPos(playerid1026.3941, -2181.158440.8012);
    
SetPlayerInterior(playerid0);
    
SetPlayerFacingAngle(playerid1.6982);
    
SetPlayerCameraPos(playerid1022.8941, -2177.158442.3012);
    
SetPlayerCameraLookAt(playerid1027.0232, -2179.783740.4760);
    
ApplyAnimation(playerid,"DANCING","DAN_LOOP_A",4.0,1,0,0,0,-1);
    switch (
classid)
    {
        case 
012:
        {
            
GameTextForPlayer(playerid"Grove"15006);
        }
        case 
345:
        {
            
GameTextForPlayer(playerid"Ballas"15006);
        }
        case 
678:
        {
            
GameTextForPlayer(playerid"Vagos"15006);
        }
        case 
91011:
        {
            
GameTextForPlayer(playerid"Policia"15006);
        }
        case 
121314:
        {
            
GameTextForPlayer(playerid"Anonymous"15006);
        }
    }
    return 
1;

Reply
#7

erro
Код:
C:\Documents and Settings\Leandro\Desktop\Servidor\gamemodes\GameMode.pwn(2880) : warning 203: symbol is never used: "Classe"
C:\Documents and Settings\Leandro\Desktop\Servidor\gamemodes\GameMode.pwn(2880) : warning 203: symbol is never used: "PlayerClasse"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply
#8

Quote:

new Classe[MAX_PLAYERS];
new PlayerClasse[MAX_PLAYERS];

Na verdade, eu fiz para criar classe...

Mas, se vocк quiser ponhar sу 'nome' tu faz que nem a do Galhardo. Porйm o meu code foi feito classes.
Reply
#9

A do Galhardo й o modo mais correto.
Alйm de nгo ter que criar variбveis (o que demanda mais tempo e memуria RAM), й simples, direto e funcional.
Reply
#10

sу ir adicionando mais assim:
PHP код:
switch(classid)
{
        case 
.. 2:
        {
                
GameTextForPlayer(playerid"Groove Street"30004);
        }
        case 
.. 5:
        {
                
Game...
        }
        case 
.. 8:
        {
                
Game...
        }
//e assim por diante.

Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)