SA-MP Forums Archive
auto refund - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: auto refund (/showthread.php?tid=402032)



auto refund - technofuzz - 24.12.2012

Dose anyone know how to remove a auto refund i cant find it anywhere!

add me on skype jason.smith5180


Re: auto refund - [CG]Milito - 24.12.2012

Auto-Refund? What you mean?


Re: auto refund - jNkk - 25.12.2012

I think he means something like when you get unfair death you get your money back..

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    //======[TAX]======//
   
    new string[128],
        wantedlevel = GetPlayerWantedLevel(playerid),
        moneyamount = GetPlayerMoney(playerid);
       
    if(moneyamount < 0) { moneyamount = moneyamount*-1; }
    if(-50000 < moneyamount < -1) { moneyamount = 0; }

    new tax; tax = 250+(moneyamount*wantedlevel)/20+random(1000);

    format(string, sizeof(string), "Your total tax was %d$.", tax);
    SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
    GivePlayerMoney(playerid, -tax);
   
    if(wantedlevel == 0 && gTeam[killerid] == TEAM_POLICE || gTeam[killerid] == TEAM_CIA)
    {
        tax = 0;
    }
   
    //=[SETPLAYERWANTEDLEVEL]=//

    SetPlayerWantedLevel(playerid, 0);
   
    return 1;
}



Re: auto refund - jNkk - 25.12.2012

You could also add :

pawn Код:
SetPlayerHealth(killerid, 0);
To kill the Policeman or Cia whatever who killed unfairly (under tax = 0)


Re: auto refund - technofuzz - 25.12.2012

No when a new charater is created it gives them 1mill and vip


Re: auto refund - Camorra - 25.12.2012

OnPlayerConnacted.
Add me on skype ill help ya.
Skype: Anthony_Camorra.