[Pedido] Tirar Medico do GM
#1

Como eu retiro o sistema do medico ficar retirando sempre $$ do player ao ele logar ou ganhar lнder, gostaria que o player sу perdesse dinheiro quando morre-se e fosse para o hospital.

Game mode usado: The GodFather Traduzido

Pedido: Retirar sistema de Medico.
Reply
#2

poste algo para podermos te ajudar!
Reply
#3

PHP код:
if(MedicBill[playerid] == && PlayerInfo[playerid][pJailed] == && PlayerPaintballing[playerid] == 0)
        {
            new 
string[256];
            new 
cut deathcost//PlayerInfo[playerid][pLevel]*deathcost;
            
GivePlayerMoney(playerid, -cut);
            
format(stringsizeof(string), "Medico: Seu Tratamento Custou $%d, Cuide Melhor de Sua Vida."cut);
            
SendClientMessage(playeridTEAM_CYAN_COLORstring);
            
MedicBill[playerid] = 0;
            
MedicTime[playerid] = 0;
            
NeedMedicTime[playerid] = 0;
            
PlayerInfo[playerid][pDeaths] += 1;
            
SetPlayerHealth(playerid25.0);
            
/*SetPlayerInterior(playerid, 5);
            rand = random(sizeof(gMedicSpawns));
            SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
            SetPlayerFacingAngle(playerid, 270.0);
            TogglePlayerControllable(playerid, 0);
            GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~y~You are recovering from your ~r~wounds~y~...", 35000, 3);
            MedicTime[playerid] = 1;
            if(PlayerInfo[playerid][pDonateRank] > 0)
            {
                NeedMedicTime[playerid] = 30;
            }
            else
            {
                NeedMedicTime[playerid] = 60;
            }
            PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
            return 1;*/
        

OnPlayerDeath

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    new 
name[MAX_PLAYER_NAME];
    new 
string[256];
    
//new dmessage[128];
    //new deathreason[20];
    
new playercash;
    new 
victimteam;
    new 
Float:px,Float:py,Float:pz;
    new 
killerteam;

    
victimteam gTeam[playerid];
    
killerteam gTeam[killerid];
    
gPlayerSpawned[playerid] = 0;
    
GetPlayerName(playeridnamesizeof(name));
    
PlayerInfo[playerid][pLocal] = 255;
    
GetPlayerPos(playeridpxpypz);
    if(
killerid != 255)
    {
        if(
GetPlayerState(killerid) == 2)
        {
            
SendClientMessage(killeridCOLOR_YELLOW"DriveBy! Se vocк ussar denovo podera ser kikado ou atй banido!");
            return 
1;
        }
    }
    if(
reason == 38)
    {
        new 
kstring[128];
        new 
kickname[MAX_PLAYER_NAME];
        if(
IsPlayerConnected(killerid))
        {
            
GetPlayerName(killeridkicknamesizeof(kickname));
            
format(string256"Aviso: [%d]%s matou um jogador com minigun,.",killerid,kickname);
            
ABroadCast(COLOR_YELLOW,string,1);
            
printf("%s"kstring);
        }
    }
    if (
gPlayerCheckpointStatus[playerid] > && gPlayerCheckpointStatus[playerid] < 11)
    {
        
DisablePlayerCheckpoint(playerid);
        
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
    }
    new 
caller Mobile[playerid];
    if(
caller != 255)
    {
        if(
caller 255)
        {
            
SendClientMessage(caller,  COLOR_GRAD2"   O justo foi morto....");
            
CellTime[caller] = 0;
            
CellTime[playerid] = 0;
            
Mobile[caller] = 255;
        }
        
Mobile[playerid] = 255;
        
CellTime[playerid] = 0;
    }
    
ClearCrime(playerid);
    if(
PlayerPaintballing[playerid] != 0)
    {
        
PlayerPaintballKills[killerid] ++;
        if(
PlayerPaintballKills[killerid] > PaintballWinnerKills)
        {
            new 
killer[MAX_PLAYER_NAME];
            
PaintballWinner killerid;
            
PaintballWinnerKills PlayerPaintballKills[killerid];
            
GetPlayerName(killeridkillersizeof(killer));
            for(new 
0MAX_PLAYERSi++)
            {
                if(
IsPlayerConnected(i))
                {
                    if(
PlayerPaintballing[i] != 0)
                    {
                        
format(stringsizeof(string), "* %s Venceu a batalha de paintball com %d pontos.",killer,PaintballWinnerKills);
                        
SendClientMessage(iCOLOR_WHITEstring);
                    }
                }
            }
        }
        return 
1;
    }
    if(
GettingCK[playerid] < 999 || OnCK[playerid] < 999)
    {
        if(
IsPlayerConnected(killerid))
        {
            if(
GettingCK[killerid] < 999 || OnCK[playerid] < 999)
            {
                new 
killer[MAX_PLAYER_NAME];
                new 
dier[MAX_PLAYER_NAME];
                
GetPlayerName(playeriddiersizeof(dier));
                
GetPlayerName(killeridkillersizeof(killer));
                
format(stringsizeof(string), "* %s vocк nгo pode jogar com essa conta porque ela foi marcada por um admin",killer);
                
SendClientMessage(playeridCOLOR_LIGHTREDstring);
                
format(stringsizeof(string), "** %s matou %s **",killer,dier);
                
CKLog(string);
                
PlayerInfo[playerid][pCK] = 1;
                if(
GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
                else if(
OnCK[playerid] < 999) { OnCK[playerid] = 999; }
                if(
GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
                else if(
OnCK[killerid] < 999) { OnCK[killerid] = 999; }
                
KickPlayer[playerid] = 1;
            }
        }
    }
    if(
PlayerInfo[playerid][pHeadValue] > 0)
    {
        if(
IsPlayerConnected(killerid))
        {
            if(
gTeam[killerid] == 10 || PlayerInfo[killerid][pLeader] == 8)
            {
                if(
GoChase[killerid] == playerid)
                {
                    
ConsumingMoney[killerid] = 1;
                    new 
killer[MAX_PLAYER_NAME];
                    
GetPlayerName(killeridkillersizeof(killer));
                    
GivePlayerMoney(killeridPlayerInfo[playerid][pHeadValue]);
                    
format(string,128,"<< Assasino %s matou %s e juntou $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]);
                    
SendFamilyMessage(8COLOR_YELLOWstring);
                    
PlayerInfo[playerid][pHeadValue] = 0;
                    
GotHit[playerid] = 0;
                    
GetChased[playerid] = 999;
                    
GoChase[killerid] = 999;
                }
            }
        }
    }
    if(
victimteam >= 4)
    {
        if(
IsPlayerConnected(killerid))
        {
            
//new killer[MAX_PLAYER_NAME];
            //GetPlayerName(killerid, killer, sizeof(killer));
            
new slice 100//$100
            
playercash GetPlayerMoney(playerid);
            if(
gTeam[killerid] != 2) { WantedPoints[killerid] += 2; } //+ 2 wanted points
            
if(SafeTime[playerid] <= 0)
            {
                if(
gTeam[killerid] != gTeam[playerid])
                {
                    if(
GetPlayerState(killerid) == 1)
                    {
                        
PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 2;
                    }
                    else
                    {
                        
PlayerInfo[killerid][pKills]++;
                    }
                    
PlayerInfo[playerid][pKills]--;
                }
            }
            
/*if (strlen(deathreason) > 0)// patch
            {
                if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || gTeam[killerid] == gTeam[playerid])//med kill criminal
                {
                    format(string, sizeof(string), ".: %s murdered %s. (%s) :.", killer, name, deathreason);
                }
                else
                {
                    format(string, sizeof(string), ".: %s murdered %s. (%s) for $%d :.", killer, name, deathreason, slice);
                }

            }
            else
            {
                if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill || gTeam[killerid] == gTeam[playerid]))
                {
                    format(string, sizeof(string), ".: %s murdered %s :.", killer, name);
                }
                else
                {
                    format(string, sizeof(string), ".: %s murdered %s for $%d :.", killer, name, slice);
                }
            }*/
            
if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == && civnokill) || (gTeam[killerid] == gTeam[playerid] && gTeam[playerid] != 4))
            {
                
slice 0;
            }
            if (((
gTeam[killerid]) != 4) && ((gTeam[killerid]) == gTeam[playerid]))//no team kill
            
{
                
slice 0;
            }
            if (
playercash 0)
            {
                
GivePlayerMoney(playerid, -slice);
            }
            else
            {
                
slice slice+500;
            }
            
GivePlayerMoney(killeridslice);
            
//GameTextForPlayer(playerid, dmessage, 5000, 2);
            
PlayerPlaySound(killerid10830.00.00.0);
            if (((
gTeam[killerid]) == 3) && reason != 49)
            {
                
SetPlayerCriminal(killerid,255"Assasinato de Primeiro Grau");
            }
            else if (((
gTeam[killerid]) == 3) && reason == 49)
            {
                
SetPlayerCriminal(killerid,255"Bateu e correu");
            }
        }
    }
    else if (
victimteam == 2)
    {
        if(
IsPlayerConnected(killerid))
        {
            
//new killer[MAX_PLAYER_NAME];
            //GetPlayerName(killerid, killer, sizeof(killer));
            // Cop kill
            
PlayerInfo[playerid][pKills]--;
            if (
gTeam[killerid] == 2)//cops kill cop
            
{
                
//format(string,128,".: Officer %s murdered Officer %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
                
PlayerPlaySound(killerid10840.00.00.0);
                
GivePlayerMoney(killerid, -suecost);
                
GivePlayerMoney(playeridsuecost+100);//+100pays hospital bill
            
}
            else
            {
                
//format(string,128,".: %s murdered Officer %s (%s) :.",killer,name,deathreason);
            
}
            if (
gTeam[killerid] >= 3)
            {
                
WantedPoints[killerid] += 2//+ 2 wanted points
                
if(reason != 49)
                {
                    
SetPlayerCriminal(killerid,255"Homicidio de primeiro Grau");
                }
                else if (
reason == 49)
                {
                    
SetPlayerCriminal(killerid,255"Bateu e correu");
                }
            }
            if(
gTeam[killerid] >= && SafeTime[playerid] <= 0)
            {
                if(
GetPlayerState(killerid) == 1)
                {
                    
PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills]+2;
                }
                else
                {
                    
PlayerInfo[killerid][pKills]++;
                }
                
WantedPoints[killerid]+=2;
            }
            
//BroadCast(COLOR_RED, string);
        
}
    }
    else if (
victimteam == 3)
    {
        if(
IsPlayerConnected(killerid))
        {
            
//new killer[MAX_PLAYER_NAME];
            //GetPlayerName(killerid, killer, sizeof(killer));
            // Civ kill
            
if ((gTeam[killerid]) == 2)//cops kill civ
            
{
                if(
WantedLevel[playerid] < 1)
                {
                    
//format(string,128,".: Officer %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
                    
PlayerPlaySound(killerid10840.00.00.0);
                    
GivePlayerMoney(killerid, -suecost);
                    
GivePlayerMoney(playeridsuecost+100);//+100pays hospital bill
                
}
            }
            else
            {
                
//format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
                
WantedPoints[killerid] += 2;
            }
            if (((
gTeam[killerid]) >= || (gTeam[killerid]) == 1) && reason != 49)
            {
                
SetPlayerCriminal(killerid,255"Homicidio de primeiro Grau");
            }
            else if (((
gTeam[killerid]) >= || (gTeam[killerid]) == 1) && reason == 49)
            {
                
SetPlayerCriminal(killerid,255"Bateu e Correu");
            }
            
//BroadCast(COLOR_RED, string);
        
}
    }
    else if (
victimteam == 1)
    {
        if(
IsPlayerConnected(killerid))
        {
            
//new killer[MAX_PLAYER_NAME];
            //GetPlayerName(killerid, killer, sizeof(killer));
            // Civ kill
            
if ((gTeam[killerid]) == 2)//cops kill civ
            
{
                
//format(string,128,".: Officer %s murdered Paramedic %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
                
PlayerPlaySound(killerid10840.00.00.0);
                
GivePlayerMoney(killerid, -suecost);
                
GivePlayerMoney(playeridsuecost+100);//+100pays hospital bill
            
}
            else if ((
gTeam[killerid]) == 1)//med kill civ
            
{
                
//format(string,128,".: Paramedic %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
                
PlayerPlaySound(killerid10840.00.00.0);
                
GivePlayerMoney(killerid, -suecost);
                
GivePlayerMoney(playeridsuecost+100);//+100pays hospital bill
            
}
            else
            {
                
//format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
            
}
            if (((
gTeam[killerid]) == 4) && reason != 49)
            {
                
SetPlayerCriminal(killerid,255"Homicidio de primeiro Grau");
            }
            else if (((
gTeam[killerid]) == 3) && reason == 49)
            {
                
SetPlayerCriminal(killerid,255"Bateu e correu");
            }
            
//BroadCast(COLOR_RED, string);
        
}
    }
    if (
victimteam >= && WantedPoints[playerid] > && killerteam == 2)
    {
        
SetPlayerFree(playerid,killerid"Morto");
    }
    
killerid INVALID_PLAYER_ID;
    
SetPlayerColor(playerid,COLOR_GRAD2);
    return 
1;

Ajudem Please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)