08.05.2013, 02:39
Ae queria colocar tipo /multar (id) (quantia) (motivo) Falta so o motivo, alguem min ajuda porfavor ?
Quote:
if(strcmp(cmd, "/multar", true) == 0) { new aname[MAX_PLAYER_NAME]; GetPlayerName(playerid, aname, MAX_PLAYER_NAME); format(file, sizeof(file), P_CONTAS, aname); if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Recruta || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Rotam || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "pAdm01") == 1 || IsPlayerAdmin(playerid)){ new tmp[256]; new plid; new quant; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, Branco, "({FF0000}ERRO{FFFFFF}) Use: /multar [id] [quantidade]"); return 1; } plid = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, Branco, "({FF0000}ERRO{FFFFFF}) Use: /multar [id] [quantidade]"); return 1; } quant = strval(tmp); if(quant > 1000 || quant <= 0){ SendClientMessage(playerid, Vermelho, "» Valor de 0 a 1000 R$."); return 1; } if(IsPlayerConnected(plid)){ new pname[MAX_PLAYER_NAME]; GetPlayerName(plid, pname, MAX_PLAYER_NAME); format(file2, sizeof(file2), P_CONTAS, pname); format(string, sizeof(string), "» Vocк recebeu uma multa de R$%d Pelo policial %s . O dinheiro foi retirado do banco.", quant, aname); SendClientMessage(plid, COLOR_GREEN, string); SendClientMessage(playerid, COLOR_GREEN, "» Multa dada."); dini_IntSet(file2, "SaldoBancario", dini_Int(file2, "SaldoBancario")- quant); return 1; } else{ SendClientMessage(playerid, Vermelho, "» O jogador nгo estб conectado!"); return 1; } } } |