[Ajuda] Comando simples!
#3

Bom o correto estб abaixo, porem se eu fosse vocк nгo fazia os comandos com comparador de strings, e sim com o processador e comandos zcmd, juntamente com sscanf bem mais fбcil.

Aproveita que estб no comeзo.

PHP код:
#include <a_samp>
#define PROF_DESEMPREGADO                                                       0
#define PROF_CARRO_FORTE                                                        1
#define C_CarroForte                                                            0x0080FFAA
new Profissao[MAX_PLAYERS];
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmdtext"/transportes"true) == 0)
    {
        if(
Profissao[playerid] != PROF_CARRO_FORTE) {
            
SendClientMessage (playerid, -1" Vocк agora trabalha na transportadoras de valores!");
            
Profissao[playerid] = PROF_CARRO_FORTE;
            
SetPlayerColor(playeridC_CarroForte);
        }
        return 
1;
    }
    if(
strcmp(cmdtext"/equipar"true) == 0)
    {
        if(
Profissao[playerid]!= PROF_CARRO_FORTE) return SendClientMessage (playerid, -1"Vocк nгo tem permissгo!");
        if(
Profissao[playerid] == PROF_CARRO_FORTE) {
            
SendClientMessage (playerid, -1"Vocк pegou seu equipamento de trabalho!");
        }
        return 
1;
    }
    return 
0;

Reply


Messages In This Thread
Comando simples! - by DarkZin - 13.12.2016, 19:33
Re: Comando simples! - by DarkZin - 13.12.2016, 22:14
Re: Comando simples! - by [BOPE]Seu._.Madruga - 13.12.2016, 22:30

Forum Jump:


Users browsing this thread: 1 Guest(s)