[Ajuda] Criar comando com opзхes
#1

Alguйm pode me informar como criar um comando com 2 ou mais opзхes
Ex: /irmap [1,2,3]
Reply
#2

Bom, vocк precisa determinar o que fazer com cada ID...

Leia este tutorial: https://sampforum.blast.hk/showthread.php?tid=277842
Reply
#3

Cria um dialog para facilitar amigo , fica mais fбcil.
Reply
#4

Creio que й isso oque procura: CreateDialog
Reply
#5

pawn Код:
CMD:irmap(playerid, params[]){
    new NumeroDoMapa;
    if(sscanf(params, "d", NumeroDoMapa))
        return SendClientMessage(playerid, -1, "USE: /irmap [NЪMERO DO MAPA].");
    if(NumeroDoMapa == 1){
        //SetPlayerPos(playerid, x, y, z);
    }
    else if(NumeroDoMapa == 2){

    }
    else if(NumeroDoMapa == 3){

    }
    else{
        return SendClientMessage(playerid, -1, "USE: /irmap [NЪMERO DO MAPA] (1 AO 3).");
    }
    return 1;
}
Reply
#6

PHP код:
CMD:irmap(playeridparams[])
{
    new 
nmapa;
    if(
sscanf(params"i"nmapa)) return SendClientMessage(playerid, -1"Use: /irmap [num]");
    switch(
nmapa)
    {
        case 
1:
        {
            
// SetPlayerPos(playerid, x, y, z)
        
}
        case 
2:
        {
            
// SetPlayerPos(playerid, x, y, z)
        
}
        case 
3:
        {
            
// SetPlayerPos(playerid, x, y, z)
        
}
        default: 
SendClientMessage(playerid, -1"Numero invбlido");
    }
    return 
1;

Reply
#7

Obrigado a tds ajudaram muito
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)