[Ajuda] ADD_CLASS
#1

Galera Adicionei Classe, mas sempres quando vou adiconar outra da erro, alguem poderia me ajdua a adicionar direitinho ?
pawn Код:
switch(FTClass[playerid])
    {
        case 0:
        {
        SetPlayerPos(playerid, 1574.4708,-1626.1627,13.4000);
        GivePlayerWeapon(playerid, 16, 50);
        SetPlayerColor(playerid, FT_CLASS);
        }
    }
    return 1;
}
Queria adicinar outro desse mas quando coloco da erro ajudem ae adicionar outro debaixo desse ?
Reply
#2

pawn Код:
switch(FTClass[playerid])
    {
        case 0:
        {
        SetPlayerPos(playerid, 1574.4708,-1626.1627,13.4000);
        GivePlayerWeapon(playerid, 16, 50);
        SetPlayerColor(playerid, FT_CLASS);
        }
        case 1:
        {
        SetPlayerPos(playerid, x,y,z);
        GivePlayerWeapon(playerid,-,-);
        SetPlayerColor(playerid, FT_CLASS);
        }
        //case 2 :
    //  { // abre
        //aqui dentro a funзao
    //  }// fecha
    //e assim por diante
    }
    return 1;
}
https://sampwiki.blast.hk/wiki/Control_Structures#switch_2

EX :

pawn Код:
switch (SomeFunction())
{
    case 1: {}
    case 2: {}
    case 3: {}
}
Reply
#3

obrigado, mas esse case 2 : e oque ? id da profissao ?
Reply
#4

@edit

nao и o numero de casas se vc for aumentar vc tem que colocar como no exemplo ali
pawn Код:
switch(sua funзгo)
{
            case 0 :
{
   //sua funзao
}
            case 1:
{
//sua funзao
}
como vc viu no exemplo acima ali
Reply
#5

OBRIGADO !
Reply
#6

^^
==

Funcionou ?
Reply
#7

Sim, Perfeitamente .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)