SA-MP Forums Archive
[Ajuda] Morrer e Pegar Arma do Xao - 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] Morrer e Pegar Arma do Xao (/showthread.php?tid=375368)



Morrer e Pegar Arma do Xao - Yunah_Play - 06.09.2012

Queria, que quando o player, morre n aparecesse a arma dele para os outros pegar, vo mandar o codigo

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    /*if(emguerra[playerid] == 1)
    {
        format(gstring, 128, "%s saiu da zona de guerra!", PlayerName(playerid));
        SendClientMessageToAll(GetPlayerColor(playerid), gstring);
        emguerra[playerid] = 0;
    }*/

    //new dmessage[128];
    //new deathreason[20];
    SendDeathMessage(killerid, playerid, reason);
    new Float:px,Float:py,Float:pz;
    PlayerInactivity[playerid] = 0;
    DropWeapons(playerid);
    DropVida(playerid);
    //DropGrana(playerid);
    gPlayerSpawned[playerid] = 0;
    PlayerInfo[playerid][pLocal] = 255;
    GetPlayerPos(playerid, px, py, pz);
    spawnado[playerid] = 0;
    antifakekill[playerid] ++;
    SetTimerEx("antifakekill2", 1000,false,"i",playerid);
    if (gPlayerTerminal[playerid] != 0)
    {
        BusrouteEnd(playerid);
    }
    if(PlayerPaintballing[killerid] == 0)
    {
        SetPlayerCriminal(killerid, 255, "Assasinato");
        PlayerInfo[killerid][pKills] += 1;
    }
    if(TendoGuerra == 1 && IsPlayerInTerritorio(playerid) && IsPlayerInTerritorio(killerid))
    {
        if(PlayerInfo[killerid][pMembro] == 3 || PlayerInfo[killerid][pLider] == 3)
        {
            if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)
            {
                Territorio[talmortos] += 1;
            }
            if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)
            {
                Territorio[almortos] += 1;
            }
        }
        if(PlayerInfo[killerid][pMembro] == 6 || PlayerInfo[killerid][pLider] == 6)
        {
            if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)
            {
                Territorio[exemortos] += 1;
            }
            if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)
            {
                Territorio[almortos] += 1;
            }
        }
        if(PlayerInfo[killerid][pMembro] == 15 || PlayerInfo[killerid][pLider] == 15)
        {
            if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)
            {
                Territorio[exemortos] += 1;
            }
            if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)
            {
                Territorio[talmortos] += 1;
            }
        }
    }



Re: Morrer e Pegar Arma do Xao - dPlaYer_ - 06.09.2012

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    /*if(emguerra[playerid] == 1)
    {
        format(gstring, 128, "%s saiu da zona de guerra!", PlayerName(playerid));
        SendClientMessageToAll(GetPlayerColor(playerid), gstring);
        emguerra[playerid] = 0;
    }*/

    //new dmessage[128];
    //new deathreason[20];
    SendDeathMessage(killerid, playerid, reason);
    new Float:px,Float:py,Float:pz;
    PlayerInactivity[playerid] = 0;
    //DropWeapons(playerid);
    DropVida(playerid);
    //DropGrana(playerid);
    gPlayerSpawned[playerid] = 0;
    PlayerInfo[playerid][pLocal] = 255;
    GetPlayerPos(playerid, px, py, pz);
    spawnado[playerid] = 0;
    antifakekill[playerid] ++;
    SetTimerEx("antifakekill2", 1000,false,"i",playerid);
    if (gPlayerTerminal[playerid] != 0)
    {
        BusrouteEnd(playerid);
    }
    if(PlayerPaintballing[killerid] == 0)
    {
        SetPlayerCriminal(killerid, 255, "Assasinato");
        PlayerInfo[killerid][pKills] += 1;
    }
    if(TendoGuerra == 1 && IsPlayerInTerritorio(playerid) && IsPlayerInTerritorio(killerid))
    {
        if(PlayerInfo[killerid][pMembro] == 3 || PlayerInfo[killerid][pLider] == 3)
        {
            if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)
            {
                Territorio[talmortos] += 1;
            }
            if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)
            {
                Territorio[almortos] += 1;
            }
        }
        if(PlayerInfo[killerid][pMembro] == 6 || PlayerInfo[killerid][pLider] == 6)
        {
            if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)
            {
                Territorio[exemortos] += 1;
            }
            if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)
            {
                Territorio[almortos] += 1;
            }
        }
        if(PlayerInfo[killerid][pMembro] == 15 || PlayerInfo[killerid][pLider] == 15)
        {
            if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)
            {
                Territorio[exemortos] += 1;
            }
            if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)
            {
                Territorio[talmortos] += 1;
            }
        }
    }



Re: Morrer e Pegar Arma do Xao - Yunah_Play - 06.09.2012

vlw + rep