[Ajuda] Como organizar esse comando ?
#1

if(strcmp(cmdtext,"/minhaprofissao", true) == 0)
{
if(Profissao[playerid] == 100)
{
SendClientMessageToAll(playerid, -1, "Estб em trabalho !");
}
else
{
SendClientMessage(playerid,-1,"Vocк nгo й taxista e nгo pode usar este comando");
}
//return 1;
}
if(strcmp(cmdtext,"/sertaxista", true) == 0)
{
if(Profissao[playerid] = 100)
{
SendClientMessage(playerid,-1,"Ola parabens voce й taxista e dirigi um taxi");
}
else
{
SendClientMessage(playerid,-1,"Vocк nгo й taxista e nгo pode usar este comando");
}
return 1;
}
return 0;
}

O erro ta no sendClientMessageToAll

@edit- OBS:Quero colocar o sendclienttoal paraque a mensagem "estб em trabalho" apareзa pra todos qnd o player digitar
Reply
#2

@Resolvido... mais tem como deixar o cmd mais organizado ?

EX: Queria colocar o /minhaprofissao como um cmd que so taxista podesse digitar !
Reply
#3

PHP код:
    if(!strcmp(cmdtext,"/minhaprofissao"true))
    {
        if(
Profissao[playerid] == 100)
        {
            
SendClientMessageToAll(playerid, -1"Estб em trabalho !");
        }
        else
        {
            
SendClientMessage(playerid,-1,"Vocк nгo й taxista e nгo pode usar este comando");
        }
        return 
true;
    }
    
    if(!
strcmp(cmdtext,"/sertaxista"true))
    {
        if(
Profissao[playerid] = 100)
        {
            
SendClientMessage(playerid,-1,"Ola parabens voce й taxista e dirigi um taxi");
        }
        else
        {
            
SendClientMessage(playerid,-1,"Vocк nгo й taxista e nгo pode usar este comando");
        }
        return 
1;
    } 
Reply
#4

Quote:
Originally Posted by zSuYaNw
Посмотреть сообщение
PHP код:
    if(!strcmp(cmdtext,"/minhaprofissao"true))
    {
        if(
Profissao[playerid] == 100)
        {
            
SendClientMessageToAll(playerid, -1"Estб em trabalho !");
        }
        else
        {
            
SendClientMessage(playerid,-1,"Vocк nгo й taxista e nгo pode usar este comando");
        }
        return 
true;
    }
    
    if(!
strcmp(cmdtext,"/sertaxista"true))
    {
        if(
Profissao[playerid] = 100//Pequeno erro aqui
        
{
            
SendClientMessage(playerid,-1,"Ola parabens voce й taxista e dirigi um taxi");
        }
        else
        {
            
SendClientMessage(playerid,-1,"Vocк nгo й taxista e nгo pode usar este comando");
        }
        return 
1;
    } 
Tem um pequeno erro no seu cуdigo ai.. Seria == nгo ?
Reply
#5

Quote:
Originally Posted by Juniiro3
Посмотреть сообщение
Tem um pequeno erro no seu cуdigo ai.. Seria == nгo ?
Sim, passou despercebido

PHP код:
    if(strcmp(cmdtext,"/minhaprofissao"true) == 0)
    {
    
        
// Verificar seo o player й taxista
        
if(Profissao[playerid] != 100)
            return 
SendClientMessage(playerid,-1,"Vocк nгo й taxista e nгo pode usar este comando");
        
        
// Resto do comando, caso for taxista.
        
        
return true;
    }
    
        
    if(
strcmp(cmdtext,"/sertaxista"true) == 0)
    {
        
// Verificar seo o player й taxista
        
if(Profissao[playerid] != 100)
            return 
SendClientMessage(playerid,-1,"Vocк nгo й taxista e nгo pode usar este comando");
    
    
        
// Resto do comando, caso for taxista.
        
return 1;
    } 
Reply
#6

mais no caso o /sertaxista e para vc ser setado ao emprego do taxista
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)