[Ajuda] Mensagem dos contratos (assasinos)
#1

Bom galera, eu como sou uma anta, to tentando aqui a 3 seculos fazer isso q eu to fazendo
pawn Код:
if(PlayerInfo[playerid][pHeadValue] > 0)
    {
        if(IsPlayerConnected(killerid))
        {
            if(GetPlayerOrg(killerid) == 8 || GetPlayerOrg(killerid) == 22)
            {
                if(GoChase[killerid] == playerid)
                {
                    if(GetPlayerOrg(killerid) == 8) { CHitman++; }
                    if(GetPlayerOrg(killerid) == 22) { CTriad++; }
                    ConsumingMoney[killerid] = 1;
                    new killer[MAX_PLAYER_NAME];
                    GetPlayerName(killerid, killer, sizeof(killer));
                    GivePlayerMoneyEx(killerid, PlayerInfo[playerid][pHeadValue]);
                    format(string,128,"<< Assasino %s Completou o contrato em %s pelo preзo de R$%d >>",killer,name,PlayerInfo[playerid][pHeadValue]);
                    SendFamilyMessage(GetPlayerOrg(killerid), COLOR_YELLOW, string);
                    format(string,128,"<< O Matador %s matou vocк por um contrato de R$%d, entгo nгo foi DM. >>",killer,PlayerInfo[playerid][pHeadValue]);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                    format(string,128,"<< O Matador %s matou o seu contrato (%s) pelo preзo de: R$%d>>",killer,name,PlayerInfo[playerid][pHeadValue]);
                    SendClientMessage(ColocouContrato, COLOR_DBLUE, string);
                    PlayerInfo[playerid][pHeadValue] = 0;
                    GotHit[playerid] = 0;
                    GetChased[playerid] = 999;
                    GoChase[killerid] = 999;
                }
            }
        }
    }
Queria que qndo um assasino matasse um contrato aparecece para todos ao contrario de aparecer sу pr a org
Assim:
<< Algum Assasino Completou o contrato em Fulano pelo preзo de [R$ XX] >>
Quote:
pawn Код:
GivePlayerMoneyEx(killerid, PlayerInfo[playerid][pHeadValue]);
                    format(string,128,"<< Assasino %s Completou o contrato em %s pelo preзo de R$%d >>",killer,name,PlayerInfo[playerid][pHeadValue]);
                    SendFamilyMessage(GetPlayerOrg(killerid), COLOR_YELLOW, string);
Reply
#2

pawn Код:
GivePlayerMoneyEx(killerid, PlayerInfo[playerid][pHeadValue]);
                    format(string,128,"<< Algum assassino completou o contrato em %s pelo preзo de R$%d >>",name,PlayerInfo[playerid][pHeadValue]);
                    SendMessageToAll(GetPlayerOrg(killerid), COLOR_YELLOW, string);
Deve ser assim
Reply
#3

Tirando ou nгo o ,name da erro
Код:
C:\Users\Felipe\Desktop\GTA SERVER\gamemodes\BML.pwn(8192) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
o erro й nessa linha
Quote:

SendClientMessageToAll(GetPlayerOrg(killerid), COLOR_YELLOW, string);

Reply
#4

Manda o code inteiro ._.
Reply
#5

tente assim

pawn Код:
GivePlayerMoneyEx(killerid, PlayerInfo[playerid][pHeadValue]);
    format(string,128,"<< Algum assassino completou o contrato em %s pelo preзo de R$%d >>",name,PlayerInfo[playerid][pHeadValue]);
    SendClientMessageToAll(COLOR_YELLOW, string);
Espero ter ajudado!
Reply
#6

Quote:

GivePlayerMoneyEx(killerid, PlayerInfo[playerid][pHeadValue]);
format(string,128,"<< Algum assassino completou o contrato em %s pelo preзo de R$%d >>",name,PlayerInfo[playerid][pHeadValue]);
SendClientMessageToAll(COLOR_YELLOW, string);

Funciono, sу que nгo aparece o nome de quem morreu sу aparece a grana
exempo, tinha um contrato de 7500 e ele foi cumprido, aparece assim:
Quote:

<< Algum assassino completou o contrato em pelo preзo de R$%d >>

Reply
#7

Esse й o codigo inteiro:
pawn Код:
if(PlayerInfo[playerid][pHeadValue] > 0)
    {
        if(IsPlayerConnected(killerid))
        {
            if(GetPlayerOrg(killerid) == 8 || GetPlayerOrg(killerid) == 22)
            {
                if(GoChase[killerid] == playerid)
                {
                    if(GetPlayerOrg(killerid) == 8) { CHitman++; }
                    if(GetPlayerOrg(killerid) == 22) { CTriad++; }
                    ConsumingMoney[killerid] = 1;
                    new killer[MAX_PLAYER_NAME];
                    GetPlayerName(killerid, killer, sizeof(killer));
                    GivePlayerMoneyEx(killerid, PlayerInfo[playerid][pHeadValue]);
                    format(string,128,"<< Algum assassino completou o contrato em %s pelo preзo de R$%d >>",name,PlayerInfo[playerid][pHeadValue]);
                    SendClientMessageToAll(COLOR_YELLOW, string);
                    format(string,128,"<< O Matador %s matou vocк por um contrato de R$%d, entгo nгo foi DM. >>",killer,PlayerInfo[playerid][pHeadValue]);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                    format(string,128,"<< O Matador %s matou o seu contrato (%s) pelo preзo de: R$%d>>",killer,name,PlayerInfo[playerid][pHeadValue]);
                    SendClientMessage(ColocouContrato, COLOR_DBLUE, string);
                    PlayerInfo[playerid][pHeadValue] = 0;
                    GotHit[playerid] = 0;
                    GetChased[playerid] = 999;
                    GoChase[killerid] = 999;
                }
            }
        }
    }
    if(PlayerInfo[killerid][pHeadValue] > 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(GetPlayerOrg(playerid) == 8 || GetPlayerOrg(playerid) == 22)
            {
                if(GoChase[playerid] == killerid)
                {
                    ConsumingMoney[playerid] = 1;
                    format(gstring,128,"<< O Matador %s foi morto por %s, e perdeu o seu contrato >>",PlayerName(playerid),PlayerName(killerid));
                    SendFamilyMessage(GetPlayerOrg(playerid), COLOR_YELLOW, gstring);
                    PlayerInfo[killerid][pHeadValue] = 0;
                    GotHit[killerid] = 0;
                    GetChased[killerid] = 999;
                    GoChase[playerid] = 999;
                }
            }
        }
    }
    killerid = INVALID_PLAYER_ID;
    SetPlayerColor(playerid,COLOR_GRAD2);
}
Reply
#8

pawn Код:
if(PlayerInfo[playerid][pHeadValue] > 0)
    {
        if(IsPlayerConnected(killerid))
        {
            if(GetPlayerOrg(killerid) == 8 || GetPlayerOrg(killerid) == 22)
            {
                if(GoChase[killerid] == playerid)
                {
                    if(GetPlayerOrg(killerid) == 8) { CHitman++; }
                    if(GetPlayerOrg(killerid) == 22) { CTriad++; }
                    ConsumingMoney[killerid] = 1;
                    new killer[MAX_PLAYER_NAME];
                    GetPlayerName(killerid, killer, sizeof(killer));
                    GivePlayerMoneyEx(killerid, PlayerInfo[playerid][pHeadValue]);
                    format(string,128,"<< Algum assassino completou o contrato de R$%d matando o %s >>",PlayerInfo[playerid][pHeadValue],name);
                    SendClientMessageToAll(COLOR_YELLOW, string);
                    format(string,128,"<< O Matador %s matou vocк por um contrato de R$%d, entгo nгo foi DM. >>",killer,PlayerInfo[playerid][pHeadValue]);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                    format(string,128,"<< O Matador %s matou o seu contrato (%s) pelo preзo de: R$%d>>",killer,name,PlayerInfo[playerid][pHeadValue]);
                    SendClientMessageToAll(COLOR_YELLOW, gstring);
                    PlayerInfo[playerid][pHeadValue] = 0;
                    GotHit[playerid] = 0;
                    GetChased[playerid] = 999;
                    GoChase[killerid] = 999;
                }
            }
        }
    }
    if(PlayerInfo[killerid][pHeadValue] > 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(GetPlayerOrg(playerid) == 8 || GetPlayerOrg(playerid) == 22)
            {
                if(GoChase[playerid] == killerid)
                {
                    ConsumingMoney[playerid] = 1;
                    format(gstring,128,"<< O Matador %s foi morto por %s, e perdeu o seu contrato >>", PlayerName(playerid),PlayerName(killerid));
                    SendClientMessageToAll(COLOR_YELLOW, gstring);
                    PlayerInfo[killerid][pHeadValue] = 0;
                    GotHit[killerid] = 0;
                    GetChased[killerid] = 999;
                    GoChase[playerid] = 999;
                }
            }
        }
    }
    killerid = INVALID_PLAYER_ID;
    SetPlayerColor(playerid,COLOR_GRAD2);
}
Reply
#9

FPB responde a PM que te mandei.
Reply
#10

Ok, vo ver se o cod que o " DiiMeNoR " funcionoue " joeyleone " ja responde a PM
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)