[Ajuda] Prender se nгo pagar multa
#1

Quando toma multa fala que se nгo pagar atй o payday vai preso , ai chega no pd e se o cara nao pago nao acontece nada '-'

pq ?

ai o codigo
pawn Код:
public PayDay(playerid)
{
 new string[256];
    new account,interest,intereste;
    new rent = 0;
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pLevel] > 0)
        {
            if(MoneyMessage[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_OOC, "Vocк devia ter debitado suas dнvidas, lhe enviaram um pedido de prisгo.");
                GameTextForPlayer(playerid, "~r~apreendido !", 2000, 1);
                SetPlayerInterior(playerid, 6);
                SetPlayerPos(playerid, 264.6288,77.5742,1001.0391);
                PlayerInfo[playerid][pJailed] = 1;
                ResetPlayerWeapons(playerid);
                WantedPoints[playerid] = 0;
                PlayerInfo[playerid][pJailTime] = 240;
                PlayerInfo[playerid][pJailTimeTotal] = 240;
                format(string, sizeof(string), "Vocк foi preso por %d segundos.   Fianca: Desativada", PlayerInfo[playerid][pJailTime]);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            }
            new playername2[MAX_PLAYER_NAME];
            GetPlayerName(playerid, playername2, sizeof(playername2));
            account = PlayerInfo[playerid][pAccount];
            new key = PlayerInfo[playerid][pPhousekey];
            if(key != 255)
            {
                rent = HouseInfo[key][hRent];
                if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
                {
                    rent = 0;
                }
                else if(rent > GetPlayerGP(playerid))
                {
                    PlayerInfo[playerid][pPhousekey] = 255;
                    SendClientMessage(playerid, COLOR_WHITE, "Vocк foi despejado.");
                    rent = 0;
                }
                HouseInfo[key][hTakings] = HouseInfo[key][hTakings] + rent;
            }
            new tmpintrate;
            if(PlayerInfo[playerid][pDonateRank] > 0) { tmpintrate = 6; }
            if (key != 255 && PlayerInfo[playerid][pDonateRank] == 0) { tmpintrate = 3; }
            if (key == 255 && PlayerInfo[playerid][pDonateRank] == 0) { tmpintrate = 1; }
            if(PlayerInfo[playerid][pPayDay] >= 0)
            {
                Tax += TaxValue;//Should work for every player online
                PlayerInfo[playerid][pAccount] -= TaxValue;
                if(PlayerInfo[playerid][pDonateRank] > 0)
                {
                    new bonus = PlayerInfo[playerid][pPayCheck] / 2;
                    PlayerInfo[playerid][pPayCheck] += bonus;
                }
                new checks = PlayerInfo[playerid][pPayCheck];
                new ebill = (PlayerInfo[playerid][pAccount]/40000)*(PlayerInfo[playerid][pLevel]);
                new TaxEstado = 5000;
                new wbill = (PlayerInfo[playerid][pAccount]/52000)*(PlayerInfo[playerid][pLevel]);
                ConsumingMoney[playerid] = 1;
                GivePlayerGP(playerid, checks);
                if(PlayerInfo[playerid][pAccount] > 0)
                {
                    PlayerInfo[playerid][pAccount] -= ebill;
                    SBizzInfo[4][sbTill] += ebill/5;
                }
                else
                {
                    ebill = 0;
                }
                if(PlayerInfo[playerid][pAccount] > 0)
                {
                    PlayerInfo[playerid][pAccount] -= wbill;
                    SBizzInfo[12][sbTill] += wbill/5;
                }
                else
                {
                    wbill = 0;
                }
Reply
#2

qual o codigo pra multar?
Reply
#3

do radar ai

pawn Код:
stock AddFlitsPaal(playerid, modelid, Float:xx, Float:yy, Float:zz, radius, speed)
{
    new fine[MAX_PLAYERS];
    new str[256];
    new newcar = GetVehicleModel(GetPlayerVehicleID(playerid));

    if(objectcreated!=maxobject)
    {
        CreateDynamicObject(modelid, xx, yy, zz-20, 0.0, 0.0, 10);
        objectcreated++;
        Create3DTextLabel("Radar !!\n 100 KM/H ", COLOR_YELLOW, xx, yy, zz+1, 50, 0, 1);
    }
    if((distance1[playerid])>speed)
    {
        if(IsPlayerInCircle(playerid, xx, yy, radius)  && GetPlayerState(playerid)== PLAYER_STATE_DRIVER)
        {
            if(!IsACop(playerid))
            {
                if(!IsAPlane(newcar))
                {
                    new sendername[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    fine[playerid]=((distance1[playerid]*17/10)-speed);
                    format(str,sizeof(str), "[Radar] O limite de velocidade й %d KM/H. Vocк foi flagrado а %d KM/H e foi multado!",speed*2, distance1[playerid]*2,fine[playerid]);
                    SendClientMessage(playerid, VERDEFRACO, str);
                    multa[playerid] += 1;
                    PlayerPlaySound(playerid, 1132, 0.0, 0.0, 0.0);
                    SendClientMessage(playerid, VERDEFRACO, "[Radar] Para pagar a multa, vб atй o balcгo da DP e digite /pagarmulta.");

                }
            }
        }
    }
}
Reply
#4

tenta assim pra ver no q da
pawn Код:
public PayDay(playerid)
{
 new string[256];
    new account,interest,intereste;
    new rent = 0;
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pLevel] > 0)
        {
            if(multa[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_OOC, "Vocк devia ter debitado suas dнvidas, lhe enviaram um pedido de prisгo.");
                GameTextForPlayer(playerid, "~r~apreendido !", 2000, 1);
                SetPlayerInterior(playerid, 6);
                SetPlayerPos(playerid, 264.6288,77.5742,1001.0391);
                PlayerInfo[playerid][pJailed] = 1;
                ResetPlayerWeapons(playerid);
                WantedPoints[playerid] = 0;
                PlayerInfo[playerid][pJailTime] = 240;
                PlayerInfo[playerid][pJailTimeTotal] = 240;
                format(string, sizeof(string), "Vocк foi preso por %d segundos.   Fianca: Desativada", PlayerInfo[playerid][pJailTime]);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            }
            new playername2[MAX_PLAYER_NAME];
            GetPlayerName(playerid, playername2, sizeof(playername2));
            account = PlayerInfo[playerid][pAccount];
            new key = PlayerInfo[playerid][pPhousekey];
            if(key != 255)
            {
                rent = HouseInfo[key][hRent];
                if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
                {
                    rent = 0;
                }
                else if(rent > GetPlayerGP(playerid))
                {
                    PlayerInfo[playerid][pPhousekey] = 255;
                    SendClientMessage(playerid, COLOR_WHITE, "Vocк foi despejado.");
                    rent = 0;
                }
                HouseInfo[key][hTakings] = HouseInfo[key][hTakings] + rent;
            }
            new tmpintrate;
            if(PlayerInfo[playerid][pDonateRank] > 0) { tmpintrate = 6; }
            if (key != 255 && PlayerInfo[playerid][pDonateRank] == 0) { tmpintrate = 3; }
            if (key == 255 && PlayerInfo[playerid][pDonateRank] == 0) { tmpintrate = 1; }
            if(PlayerInfo[playerid][pPayDay] >= 0)
            {
                Tax += TaxValue;//Should work for every player online
                PlayerInfo[playerid][pAccount] -= TaxValue;
                if(PlayerInfo[playerid][pDonateRank] > 0)
                {
                    new bonus = PlayerInfo[playerid][pPayCheck] / 2;
                    PlayerInfo[playerid][pPayCheck] += bonus;
                }
                new checks = PlayerInfo[playerid][pPayCheck];
                new ebill = (PlayerInfo[playerid][pAccount]/40000)*(PlayerInfo[playerid][pLevel]);
                new TaxEstado = 5000;
                new wbill = (PlayerInfo[playerid][pAccount]/52000)*(PlayerInfo[playerid][pLevel]);
                ConsumingMoney[playerid] = 1;
                GivePlayerGP(playerid, checks);
                if(PlayerInfo[playerid][pAccount] > 0)
                {
                    PlayerInfo[playerid][pAccount] -= ebill;
                    SBizzInfo[4][sbTill] += ebill/5;
                }
                else
                {
                    ebill = 0;
                }
                if(PlayerInfo[playerid][pAccount] > 0)
                {
                    PlayerInfo[playerid][pAccount] -= wbill;
                    SBizzInfo[12][sbTill] += wbill/5;
                }
                else
                {
                    wbill = 0;
                }
Reply
#5

Funfo , vlw lesk =D

Ganho 1 rep

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)