SA-MP Forums Archive
[Ajuda] OnPlayerDeath Dando fake Kill. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] OnPlayerDeath Dando fake Kill. (/showthread.php?tid=559036)



OnPlayerDeath Dando fake Kill. - SeckSeck - 20.01.2015

Bom, depois que coloquei esses codigos de roubar bancos mercados e subway's sempre que uma pessoa morre aparece que ela morreu 4 vezes como se fosse fake kill, gostaria de saber oque esta errado?
Print: http://i.imgur.com/sYkKJyL.jpg

Codigo:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    DropWeapons(playerid);
	GivePlayerMoney(killerid, 20000);
	SendDeathMessage(killerid, playerid, reason);
	Roubando[playerid] = 0;
	static Matou[MAX_PLAYER_NAME], Morreu[MAX_PLAYER_NAME], sStr[90];
	GetPlayerName(killerid, Matou, sizeof(Matou));
	GetPlayerName(playerid, Morreu, sizeof(Morreu));
	format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
	if(Roubando[playerid] == 1)
	{
		static Ladrao[MAX_PLAYER_NAME], sStrs[100];
		GetPlayerName(playerid, Ladrao, sizeof(Ladrao));
		format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao banco foi cancelado!", Ladrao, playerid);
		SendClientMessageToAll( COR_USOCORRETO, sStrs);
		Roubando[playerid] = 0;
		return 1;
	}
	if(Roubando[killerid] == 1)
	{
		SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
		Roubando[killerid] = 0;
		return 1;
	}

    DropWeapons(playerid);
	GivePlayerMoney(killerid, 20000);
	SendDeathMessage(killerid, playerid, reason);
	Roubandosubway[playerid] = 0;
	GetPlayerName(killerid, Matou, sizeof(Matou));
	GetPlayerName(playerid, Morreu, sizeof(Morreu));
	format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
	if(Roubandosubway[playerid] == 1)
	{
		static Ladraosubway[MAX_PLAYER_NAME], sStrs[100];
		GetPlayerName(playerid, Ladraosubway, sizeof(Ladraosubway));
		format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo a Subway foi cancelado!", Ladraosubway, playerid);
		SendClientMessageToAll( COR_USOCORRETO, sStrs);
		Roubandosubway[playerid] = 0;
		return 1;
	}
	if(Roubandosubway[killerid] == 1)
	{
		SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
		Roubandosubway[killerid] = 0;
		return 1;
	}

    DropWeapons(playerid);
	GivePlayerMoney(killerid, 20000);
	SendDeathMessage(killerid, playerid, reason);
	Roubandomercado[playerid] = 0;
	GetPlayerName(killerid, Matou, sizeof(Matou));
	GetPlayerName(playerid, Morreu, sizeof(Morreu));
	format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
	if(Roubandomercado[playerid] == 1)
	{
		static Ladraomercado[MAX_PLAYER_NAME], sStrs[100];
		GetPlayerName(playerid, Ladraomercado, sizeof(Ladraomercado));
		format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao Supermercado foi cancelado!", Ladraomercado, playerid);
		SendClientMessageToAll( COR_USOCORRETO, sStrs);
		Roubandomercado[playerid] = 0;
		return 1;
	}
	if(Roubandomercado[killerid] == 1)
	{
		SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
		Roubandomercado[killerid] = 0;
		return 1;
	}



Re: OnPlayerDeath Dando fake Kill. - #Luca[S]. - 20.01.2015

Quote:
Originally Posted by SeckSeck
Посмотреть сообщение
Bom, depois que coloquei esses codigos de roubar bancos mercados e subway's sempre que uma pessoa morre aparece que ela morreu 4 vezes como se fosse fake kill, gostaria de saber oque esta errado?
Print: http://i.imgur.com/sYkKJyL.jpg

Codigo:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    DropWeapons(playerid);
	GivePlayerMoney(killerid, 20000);
	SendDeathMessage(killerid, playerid, reason);
	Roubando[playerid] = 0;
	static Matou[MAX_PLAYER_NAME], Morreu[MAX_PLAYER_NAME], sStr[90];
	GetPlayerName(killerid, Matou, sizeof(Matou));
	GetPlayerName(playerid, Morreu, sizeof(Morreu));
	format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
	if(Roubando[playerid] == 1)
	{
		static Ladrao[MAX_PLAYER_NAME], sStrs[100];
		GetPlayerName(playerid, Ladrao, sizeof(Ladrao));
		format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao banco foi cancelado!", Ladrao, playerid);
		SendClientMessageToAll( COR_USOCORRETO, sStrs);
		Roubando[playerid] = 0;
		return 1;
	}
	if(Roubando[killerid] == 1)
	{
		SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
		Roubando[killerid] = 0;
		return 1;
	}

    DropWeapons(playerid);
	GivePlayerMoney(killerid, 20000);
	SendDeathMessage(killerid, playerid, reason);
	Roubandosubway[playerid] = 0;
	GetPlayerName(killerid, Matou, sizeof(Matou));
	GetPlayerName(playerid, Morreu, sizeof(Morreu));
	format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
	if(Roubandosubway[playerid] == 1)
	{
		static Ladraosubway[MAX_PLAYER_NAME], sStrs[100];
		GetPlayerName(playerid, Ladraosubway, sizeof(Ladraosubway));
		format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo a Subway foi cancelado!", Ladraosubway, playerid);
		SendClientMessageToAll( COR_USOCORRETO, sStrs);
		Roubandosubway[playerid] = 0;
		return 1;
	}
	if(Roubandosubway[killerid] == 1)
	{
		SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
		Roubandosubway[killerid] = 0;
		return 1;
	}

    DropWeapons(playerid);
	GivePlayerMoney(killerid, 20000);
	SendDeathMessage(killerid, playerid, reason);
	Roubandomercado[playerid] = 0;
	GetPlayerName(killerid, Matou, sizeof(Matou));
	GetPlayerName(playerid, Morreu, sizeof(Morreu));
	format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
	if(Roubandomercado[playerid] == 1)
	{
		static Ladraomercado[MAX_PLAYER_NAME], sStrs[100];
		GetPlayerName(playerid, Ladraomercado, sizeof(Ladraomercado));
		format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao Supermercado foi cancelado!", Ladraomercado, playerid);
		SendClientMessageToAll( COR_USOCORRETO, sStrs);
		Roubandomercado[playerid] = 0;
		return 1;
	}
	if(Roubandomercado[killerid] == 1)
	{
		SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
		Roubandomercado[killerid] = 0;
		return 1;
	}
Isso й um hack, ou acontece sozinho?


Respuesta: Re: OnPlayerDeath Dando fake Kill. - SeckSeck - 20.01.2015

Quote:
Originally Posted by TenhoUmaDuvida
Посмотреть сообщение
Isso й um hack, ou acontece sozinho?
se voce matar alguem ou morrer ele se repete 4 vezes...


Re: OnPlayerDeath Dando fake Kill. - #Luca[S]. - 20.01.2015

Tenta assim
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    DropWeapons(playerid);
    GivePlayerMoney(killerid, 20000);
    SendDeathMessage(killerid, playerid, reason);
    Roubando[playerid] = 0;
    static Matou[MAX_PLAYER_NAME], Morreu[MAX_PLAYER_NAME], sStr[90];
    GetPlayerName(killerid, Matou, sizeof(Matou));
    GetPlayerName(playerid, Morreu, sizeof(Morreu));
    format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
    if(Roubando[playerid] == 1)
    {
        static Ladrao[MAX_PLAYER_NAME], sStrs[100];
        GetPlayerName(playerid, Ladrao, sizeof(Ladrao));
        format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao banco foi cancelado!", Ladrao, playerid);
        SendClientMessageToAll( COR_USOCORRETO, sStrs);
        Roubando[playerid] = 0;
        return 1;
    }
    if(Roubando[killerid] == 1)
    {
        SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
        Roubando[killerid] = 0;
        return 1;
    }

    DropWeapons(playerid);
    GivePlayerMoney(killerid, 20000);
    Roubandosubway[playerid] = 0;
    GetPlayerName(killerid, Matou, sizeof(Matou));
    GetPlayerName(playerid, Morreu, sizeof(Morreu));
    format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
    if(Roubandosubway[playerid] == 1)
    {
        static Ladraosubway[MAX_PLAYER_NAME], sStrs[100];
        GetPlayerName(playerid, Ladraosubway, sizeof(Ladraosubway));
        format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo a Subway foi cancelado!", Ladraosubway, playerid);
        SendClientMessageToAll( COR_USOCORRETO, sStrs);
        Roubandosubway[playerid] = 0;
        return 1;
    }
    if(Roubandosubway[killerid] == 1)
    {
        SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
        Roubandosubway[killerid] = 0;
        return 1;
    }

    DropWeapons(playerid);
    GivePlayerMoney(killerid, 20000);
    Roubandomercado[playerid] = 0;
    GetPlayerName(killerid, Matou, sizeof(Matou));
    GetPlayerName(playerid, Morreu, sizeof(Morreu));
    format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
    if(Roubandomercado[playerid] == 1)
    {
        static Ladraomercado[MAX_PLAYER_NAME], sStrs[100];
        GetPlayerName(playerid, Ladraomercado, sizeof(Ladraomercado));
        format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao Supermercado foi cancelado!", Ladraomercado, playerid);
        SendClientMessageToAll( COR_USOCORRETO, sStrs);
        Roubandomercado[playerid] = 0;
        return 1;
    }
    if(Roubandomercado[killerid] == 1)
    {
        SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
        Roubandomercado[killerid] = 0;
        return 1;
    }



Respuesta: Re: OnPlayerDeath Dando fake Kill. - SeckSeck - 20.01.2015

Quote:
Originally Posted by TenhoUmaDuvida
Посмотреть сообщение
Tenta assim
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    DropWeapons(playerid);
    GivePlayerMoney(killerid, 20000);
    SendDeathMessage(killerid, playerid, reason);
    Roubando[playerid] = 0;
    static Matou[MAX_PLAYER_NAME], Morreu[MAX_PLAYER_NAME], sStr[90];
    GetPlayerName(killerid, Matou, sizeof(Matou));
    GetPlayerName(playerid, Morreu, sizeof(Morreu));
    format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
    if(Roubando[playerid] == 1)
    {
        static Ladrao[MAX_PLAYER_NAME], sStrs[100];
        GetPlayerName(playerid, Ladrao, sizeof(Ladrao));
        format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao banco foi cancelado!", Ladrao, playerid);
        SendClientMessageToAll( COR_USOCORRETO, sStrs);
        Roubando[playerid] = 0;
        return 1;
    }
    if(Roubando[killerid] == 1)
    {
        SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
        Roubando[killerid] = 0;
        return 1;
    }

    DropWeapons(playerid);
    GivePlayerMoney(killerid, 20000);
    Roubandosubway[playerid] = 0;
    GetPlayerName(killerid, Matou, sizeof(Matou));
    GetPlayerName(playerid, Morreu, sizeof(Morreu));
    format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
    if(Roubandosubway[playerid] == 1)
    {
        static Ladraosubway[MAX_PLAYER_NAME], sStrs[100];
        GetPlayerName(playerid, Ladraosubway, sizeof(Ladraosubway));
        format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo a Subway foi cancelado!", Ladraosubway, playerid);
        SendClientMessageToAll( COR_USOCORRETO, sStrs);
        Roubandosubway[playerid] = 0;
        return 1;
    }
    if(Roubandosubway[killerid] == 1)
    {
        SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
        Roubandosubway[killerid] = 0;
        return 1;
    }

    DropWeapons(playerid);
    GivePlayerMoney(killerid, 20000);
    Roubandomercado[playerid] = 0;
    GetPlayerName(killerid, Matou, sizeof(Matou));
    GetPlayerName(playerid, Morreu, sizeof(Morreu));
    format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
    if(Roubandomercado[playerid] == 1)
    {
        static Ladraomercado[MAX_PLAYER_NAME], sStrs[100];
        GetPlayerName(playerid, Ladraomercado, sizeof(Ladraomercado));
        format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao Supermercado foi cancelado!", Ladraomercado, playerid);
        SendClientMessageToAll( COR_USOCORRETO, sStrs);
        Roubandomercado[playerid] = 0;
        return 1;
    }
    if(Roubandomercado[killerid] == 1)
    {
        SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
        Roubandomercado[killerid] = 0;
        return 1;
    }
Antes ele repetia 4 vezes, agora ta repetindo 2 !


Re: Respuesta: Re: OnPlayerDeath Dando fake Kill. - #Luca[S]. - 20.01.2015

Quote:
Originally Posted by SeckSeck
Посмотреть сообщение
Antes ele repetia 4 vezes, agora ta repetindo 2 !
Tente!
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    DropWeapons(playerid);
    GivePlayerMoney(killerid, 20000);
    SendDeathMessage(killerid, playerid, reason);
    Roubando[playerid] = 0;
    static Matou[MAX_PLAYER_NAME], Morreu[MAX_PLAYER_NAME], sStr[90];
    GetPlayerName(killerid, Matou, sizeof(Matou));
    GetPlayerName(playerid, Morreu, sizeof(Morreu));
    format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
    if(Roubando[playerid] == 1)
    {
        static Ladrao[MAX_PLAYER_NAME], sStrs[100];
        GetPlayerName(playerid, Ladrao, sizeof(Ladrao));
        format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao banco foi cancelado!", Ladrao, playerid);
        SendClientMessageToAll( COR_USOCORRETO, sStrs);
        Roubando[playerid] = 0;
        return 1;
    }
    if(Roubando[killerid] == 1)
    {
        SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
        Roubando[killerid] = 0;
        return 1;
    }

    DropWeapons(playerid);
    GivePlayerMoney(killerid, 20000);
    Roubandosubway[playerid] = 0;
    format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
    if(Roubandosubway[playerid] == 1)
    {
        static Ladraosubway[MAX_PLAYER_NAME], sStrs[100];
        GetPlayerName(playerid, Ladraosubway, sizeof(Ladraosubway));
        format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo a Subway foi cancelado!", Ladraosubway, playerid);
        SendClientMessageToAll( COR_USOCORRETO, sStrs);
        Roubandosubway[playerid] = 0;
        return 1;
    }
    if(Roubandosubway[killerid] == 1)
    {
        SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
        Roubandosubway[killerid] = 0;
        return 1;
    }

    DropWeapons(playerid);
    GivePlayerMoney(killerid, 20000);
    Roubandomercado[playerid] = 0;
    format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
    if(Roubandomercado[playerid] == 1)
    {
        static Ladraomercado[MAX_PLAYER_NAME], sStrs[100];
        GetPlayerName(playerid, Ladraomercado, sizeof(Ladraomercado));
        format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao Supermercado foi cancelado!", Ladraomercado, playerid);
        SendClientMessageToAll( COR_USOCORRETO, sStrs);
        Roubandomercado[playerid] = 0;
        return 1;
    }
    if(Roubandomercado[killerid] == 1)
    {
        SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
        Roubandomercado[killerid] = 0;
        return 1;
    }



Respuesta: OnPlayerDeath Dando fake Kill. - SeckSeck - 20.01.2015

Ainda continua 2 mano !


Re: OnPlayerDeath Dando fake Kill. - #Luca[S]. - 20.01.2015

Tente novamente:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    DropWeapons(playerid);
    GivePlayerMoney(killerid, 20000);
    Roubando[playerid] = 0;
    static Matou[MAX_PLAYER_NAME], Morreu[MAX_PLAYER_NAME], sStr[90];
    GetPlayerName(killerid, Matou, sizeof(Matou));
    GetPlayerName(playerid, Morreu, sizeof(Morreu));
    format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
    if(Roubando[playerid] == 1)
    {
        static Ladrao[MAX_PLAYER_NAME], sStrs[100];
        GetPlayerName(playerid, Ladrao, sizeof(Ladrao));
        format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao banco foi cancelado!", Ladrao, playerid);
        SendClientMessageToAll( COR_USOCORRETO, sStrs);
        Roubando[playerid] = 0;
        return 1;
    }
    if(Roubando[killerid] == 1)
    {
        SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
        Roubando[killerid] = 0;
        return 1;
    }

    DropWeapons(playerid);
    GivePlayerMoney(killerid, 20000);
    Roubandosubway[playerid] = 0;
    format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
    if(Roubandosubway[playerid] == 1)
    {
        static Ladraosubway[MAX_PLAYER_NAME], sStrs[100];
        GetPlayerName(playerid, Ladraosubway, sizeof(Ladraosubway));
        format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo a Subway foi cancelado!", Ladraosubway, playerid);
        SendClientMessageToAll( COR_USOCORRETO, sStrs);
        Roubandosubway[playerid] = 0;
        return 1;
    }
    if(Roubandosubway[killerid] == 1)
    {
        SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
        Roubandosubway[killerid] = 0;
        return 1;
    }

    DropWeapons(playerid);
    GivePlayerMoney(killerid, 20000);
    Roubandomercado[playerid] = 0;
    format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
    if(Roubandomercado[playerid] == 1)
    {
        static Ladraomercado[MAX_PLAYER_NAME], sStrs[100];
        GetPlayerName(playerid, Ladraomercado, sizeof(Ladraomercado));
        format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao Supermercado foi cancelado!", Ladraomercado, playerid);
        SendClientMessageToAll( COR_USOCORRETO, sStrs);
        Roubandomercado[playerid] = 0;
        return 1;
    }
    if(Roubandomercado[killerid] == 1)
    {
        SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
        Roubandomercado[killerid] = 0;
        return 1;
    }
Se Funcionar Avisa


Respuesta: OnPlayerDeath Dando fake Kill. - SeckSeck - 20.01.2015

Vlw mano obrigado ae !


Re: OnPlayerDeath Dando fake Kill. - Caiton - 22.01.2015

Quote:
Originally Posted by SeckSeck
Посмотреть сообщение
Bom, depois que coloquei esses codigos de roubar bancos mercados e subway's sempre que uma pessoa morre aparece que ela morreu 4 vezes como se fosse fake kill, gostaria de saber oque esta errado?
Print: http://i.imgur.com/sYkKJyL.jpg

Codigo:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    DropWeapons(playerid);
	GivePlayerMoney(killerid, 20000);
	SendDeathMessage(killerid, playerid, reason);
	Roubando[playerid] = 0;
	static Matou[MAX_PLAYER_NAME], Morreu[MAX_PLAYER_NAME], sStr[90];
	GetPlayerName(killerid, Matou, sizeof(Matou));
	GetPlayerName(playerid, Morreu, sizeof(Morreu));
	format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
	if(Roubando[playerid] == 1)
	{
		static Ladrao[MAX_PLAYER_NAME], sStrs[100];
		GetPlayerName(playerid, Ladrao, sizeof(Ladrao));
		format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao banco foi cancelado!", Ladrao, playerid);
		SendClientMessageToAll( COR_USOCORRETO, sStrs);
		Roubando[playerid] = 0;
		return 1;
	}
	if(Roubando[killerid] == 1)
	{
		SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
		Roubando[killerid] = 0;
		return 1;
	}

    DropWeapons(playerid);
	GivePlayerMoney(killerid, 20000);
	SendDeathMessage(killerid, playerid, reason);
	Roubandosubway[playerid] = 0;
	GetPlayerName(killerid, Matou, sizeof(Matou));
	GetPlayerName(playerid, Morreu, sizeof(Morreu));
	format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
	if(Roubandosubway[playerid] == 1)
	{
		static Ladraosubway[MAX_PLAYER_NAME], sStrs[100];
		GetPlayerName(playerid, Ladraosubway, sizeof(Ladraosubway));
		format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo a Subway foi cancelado!", Ladraosubway, playerid);
		SendClientMessageToAll( COR_USOCORRETO, sStrs);
		Roubandosubway[playerid] = 0;
		return 1;
	}
	if(Roubandosubway[killerid] == 1)
	{
		SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
		Roubandosubway[killerid] = 0;
		return 1;
	}

    DropWeapons(playerid);
	GivePlayerMoney(killerid, 20000);
	SendDeathMessage(killerid, playerid, reason);
	Roubandomercado[playerid] = 0;
	GetPlayerName(killerid, Matou, sizeof(Matou));
	GetPlayerName(playerid, Morreu, sizeof(Morreu));
	format(sStr, sizeof(sStr), "[NOTНCIAS]: %s[%d] matou o ladrгo %s[%d].", Matou, killerid, Morreu, playerid);
	if(Roubandomercado[playerid] == 1)
	{
		static Ladraomercado[MAX_PLAYER_NAME], sStrs[100];
		GetPlayerName(playerid, Ladraomercado, sizeof(Ladraomercado));
		format(sStrs, sizeof(sStrs), "[NOTНCIAS]: %s[%d] morreu e o roubo ao Supermercado foi cancelado!", Ladraomercado, playerid);
		SendClientMessageToAll( COR_USOCORRETO, sStrs);
		Roubandomercado[playerid] = 0;
		return 1;
	}
	if(Roubandomercado[killerid] == 1)
	{
		SendClientMessage(playerid, COR_USOCORRETO, "[CB]: Vocк matou o ladrгo!");
		Roubandomercado[killerid] = 0;
		return 1;
	}
conheзo esses cуdigo de longe, para de usar o gm da gf que o ferb criou e toma vergonha na cara e cria um gm do 0 assim terб menos problemas e mais respeito com os programadores, isso sу estб manchando seu servidor cada vez mais !
e uma observaзгo, vocк poderia ter usado a mesma variбvel pra tudo, mais como vocк quer copiar o sistema de roubar mercado da extreme brasil nгo deve saber disso