Can anyone pass this command from ZCMD to STRCMP?
#3

Quote:
Originally Posted by GTLS
Посмотреть сообщение
PHP код:
if(!strcmp(cmd"/darcash"true)) //Under OnPlayerCommandText

    if(
JogadorInfo[playerid][pAdmin] < 1342 || IsPlayerAdmin(playerid)) return SendClientMessage(playeridiCor_Chat"Vocк nгo й Administrador Dono"); 
    if(
sscanf(params"dd"iIdSmiriTotalCash)) return SendClientMessage(playeridiCor_Chat"USO: /darcash [ID] [Quantidade]"); 
    if(!
IsPlayerConnected(iIdSmir)) return SendClientMessage(playeridiCor_Chat"ID Nгo Conectado"); 
    
GetPlayerName(playeridNomesizeof(Nome)); 
    
GetPlayerName(iIdSmirNome2sizeof(Nome2)); 
    
format(iCelulassizeof(iCelulas), "[ iShoppinG ]: %s Deu %d Cash's Para o Jogador %s"NomeiTotalCashNome2); 
    
SmirnoffReceberMensagens(COLOR_YELLOW,iCelulas,1); 
    
format(iCelulassizeof(iCelulas), "Vocк Recebeu [%d] de Cash do Administrador [%s]"iTotalCashNome); 
    
SendClientMessage(iIdSmirCOLOR_LIGHTBLUEiCelulas); 
    
JogadorInfo[playerid][pCoins] += iTotalCash
    
AtualizarCash(iIdSmir); 
    return 
1

It was literally one line change... and refrain from saying you'll +rep for help cuz people tend not to help sometimes.
This will not work, since you did not extract any of the command parameters.

To OP: Why even convert to strcmp? It's old, slow and there are much better command processors available, such as ZCMD.
Reply


Messages In This Thread
Can anyone pass this command from ZCMD to STRCMP? - by leobpo - 15.05.2018, 03:55
Re: Can anyone pass this command from ZCMD to STRCMP? - by GTLS - 15.05.2018, 06:27
Re: Can anyone pass this command from ZCMD to STRCMP? - by Sithis - 15.05.2018, 08:30
Re: Can anyone pass this command from ZCMD to STRCMP? - by CodeStyle175 - 15.05.2018, 08:32

Forum Jump:


Users browsing this thread: 1 Guest(s)