04.05.2016, 01:56
Quote:
Agora estб aparecendo o nome do jogador que foi Multado, mais nгo aparece no valor que ele foi multado aparece sу R$
|
PHP код:
if(strcmp(cmd, "/multar", true) == 0)
{
new
aname[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 1 || IsPlayerAdmin(playerid))
{
new
tmp[256],
plid,
quant,
motivo[64]
;
tmp = strtok(cmdtext, idx);
if(strlen(tmp))
return SendClientMessage(playerid, -1, "/multar [id] [quantidade] [motivo]");
plid = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, -1, "/multar [id] [quantidade] [motivo]");
if(UsouID[plid] == true)
return SendClientMessage(playerid, -1, "Espere 1 Minutos para Multar esse ID Novamente!");
quant = strval(tmp);
if(quant > 1000 || quant <= 0)
return SendClientMessage(playerid, -1, "(INFO) Vocк nгo estб multando de forma justa.");
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
while ((idxex < length) && ((idxex - offset) < (sizeof(motivo) - 1)))
{
motivo[idx - offset] = cmdtext[idx];
idx++;
}
motivo[idx - offset] = EOS;
if(!strlen(motivo))
return SendClientMessage(playerid,0xFFFFAA,"Uso correto: /banip [id] [motivo].");
if(IsPlayerConnected(plid))
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
format(string, sizeof(string), "(INFO) Vocк recebeu uma multa de R$%d Pelo policial %s . O dinheiro foi retirado do banco.", quant, aname);
SendClientMessage(plid, COLOR_GREEN, string);
format(string, sizeof(string), "(INFO) O jogador %s recebeu uma multa de R$%d Pelo policial %s pelo motivo [ %s ] . O dinheiro foi retirado do banco." pname, quant, aname, motivo);
SendClientMessageToAll( COLOR_GREEN, string );
UsouID[plid] = true;
SetTimerEx("ResetarMultados", 60000, true, "i", plid);
dini_IntSet(file2, "SaldoBancario", dini_Int(file2, "SaldoBancario")- quant);
return 1;
}
else
{
SendClientMessage(playerid, -1, "(INFO) O jogador nгo estб conectado!");
return 1;
}
}
return 1;
}