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

why would you even want to do that? strcmp is always slower
PHP код:
#include <a_samp>
#include <sscanf2>
uname(pid){
    new 
s[24];
    
GetPlayerName(pid,s,24);
    return 
s;
}
#define scm SendClientMessage
public OnPlayerCommandText(playeridcmdtext[]){
    new 
pid=playerid,cmd[30],p[128],s[128];
    
sscanf(cmdtext"s[30]s[128]"cmdp);
    if(!
strcmp(cmd,"/darcash"true)){
        new 
idamount;
        if(
JogadorInfo[pid][pAdmin] < 1342 && !IsPlayerAdmin(pid)) return scm(pidiCor_Chat"Vocк nгo й Administrador Dono"); 
        if(
sscanf(p,"dd",idamount)) return scm(pidiCor_Chat"USO: /darcash [ID] [Quantidade]"); 
        if(!
IsPlayerConnected(id)) return scm(pidiCor_Chat"ID Nгo Conectado"); 
        
        
format(ssizeof(s), "[ iShoppinG ]: %s Deu %d Cash's Para o Jogador %s"uname(pid), amountuname(id)); 
        
SmirnoffReceberMensagens(COLOR_YELLOW,s,1); 
        
        
format(ssizeof(s), "Vocк Recebeu [%d] de Cash do Administrador [%s]"amountNome); 
        
scm(idCOLOR_LIGHTBLUEs); 
        
        
JogadorInfo[pid][pCoins] += amount
        
AtualizarCash(id);     
    }
    return 
0;

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)