[Ajuda] /Contratos
#2

Att.
Consegui criar o dialogo e tal, mas quando o assassino cumpre o contrato o nick da vitima continua no /Vitimas como mostra as prints a seguir


/Contrato:
Код:
CMD:contrato(playerid,params[])
{
    if(sscanf(params, "ud", giveid, grana)) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Uso correto: /Contrato [ID do Alvo] [Grana]");
    if(grana > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Vocк nгo tem esse dinheiro.");
    if(grana <= 500 || grana >= 10000)return  SendClientMessage(playerid, COLOR_ERRO, "[ x ] Valor entre 500 e 10000 R$");
    if(!IsPlayerConnected(giveid))return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Player nгo conectado!");
    Valor[giveid]+=grana;
    GivePlayerMoney(playerid, -grana);
    GetPlayerName(giveid, vitima, sizeof(vitima));
    GetPlayerName(playerid, crioumatou, sizeof(crioumatou));
    format(_Str, sizeof(_Str), "[CONTRATO] {00FF66}%s {FFFFFF}colocou um contrato de {00FF66}R$%d {FFFFFF}em %s.", crioumatou, grana, Valor[giveid], vitima);
    SendClientMessageToAll(COLOR_AMARELO, _Str);
    format(_Str, sizeof(_Str), "[PERIGO] %s encomendou sua morte no valor de R$%d.", crioumatou, grana);
    SendClientMessage(giveid, COLOR_ERRO, _Str);
    return true;
}
/Vitimas:
Код:
CMD:vitimas(playerid) 
{ 
	new String[128];
	new id;
    if(Player[playerid][Fundador] <= 0) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Vocк nгo й um Assassino!"); 
    format(String, sizeof(String), "Vitima: %s\tRecompensa: %d\tID: %d", vitima, grana, id);
    ShowPlayerDialog(playerid, Dialog_Contratos, DIALOG_STYLE_LIST, "CONTRATOS", String, "Fechar", #);
    return 1;
}
Reply


Messages In This Thread
/Contratos - by Hunterx157 - 15.05.2018, 22:37
Re: /Contratos - by Hunterx157 - 16.05.2018, 02:02
Re: /Contratos - by FerrariL - 16.05.2018, 02:57
Re: /Contratos - by Hunterx157 - 16.05.2018, 02:58
Re: /Contratos - by ipsLuan - 16.05.2018, 10:56
Re: /Contratos - by Hunterx157 - 16.05.2018, 14:01
Re: /Contratos - by ipsLuan - 16.05.2018, 14:52
Re: /Contratos - by Hunterx157 - 16.05.2018, 15:11
Re: /Contratos - by ipsLuan - 16.05.2018, 16:03

Forum Jump:


Users browsing this thread: 2 Guest(s)