15.05.2018, 08:32
(
Последний раз редактировалось CodeStyle175; 19.05.2018 в 16:12.
)
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(playerid, cmdtext[]){
new pid=playerid,cmd[30],p[128],s[128];
sscanf(cmdtext, "s[30]s[128]", cmd, p);
if(!strcmp(cmd,"/darcash", true)){
new id, amount;
if(JogadorInfo[pid][pAdmin] < 1342 && !IsPlayerAdmin(pid)) return scm(pid, iCor_Chat, "Vocк nгo й Administrador Dono");
if(sscanf(p,"dd",id, amount)) return scm(pid, iCor_Chat, "USO: /darcash [ID] [Quantidade]");
if(!IsPlayerConnected(id)) return scm(pid, iCor_Chat, "ID Nгo Conectado");
format(s, sizeof(s), "[ iShoppinG ]: %s Deu %d Cash's Para o Jogador %s", uname(pid), amount, uname(id));
SmirnoffReceberMensagens(COLOR_YELLOW,s,1);
format(s, sizeof(s), "Vocк Recebeu [%d] de Cash do Administrador [%s]", amount, Nome);
scm(id, COLOR_LIGHTBLUE, s);
JogadorInfo[pid][pCoins] += amount;
AtualizarCash(id);
}
return 0;
}