PayDay Dialog
#1

i made the payday in dialog.so at payday he gets dialog.at each payday he gets "Nu ai jucat suficient de mult pentru a obtine un cec" translate: you havent player much to get payday!


PHP код:
    public PayDay()
                    {
                    new 
string[128];
                    new 
account,interest;
                    new 
rent 0;
                    for(new 
0MAX_PLAYERSi++) // this bothering?
                    
{
                        if(
IsPlayerConnected(i))
                        {
                            if(
PlayerInfo[i][pLevel] > 0)
                            {
                                if(
MoneyMessage[i]==1)
                                {
                                    
SendClientMessage(iCOLOR_RED"Tu nu ai reusit sa platesti datoriile tale, treci la inchisoare.");
                                    
GameTextForPlayer(i"~r~Busted!"20001);
                                    
SetPlayerInterior(i6);
                                    
PlayerInfo[i][pInt] = 6;
                                    new 
rand random(sizeof(gJailSpawns));
                                    
SetPlayerPos(igJailSpawns[rand][0], gJailSpawns[rand][1], gJailSpawns[rand][2]); // Warp the player
                                    
PlayerInfo[i][pJailed] = 1;
                                    
ResetPlayerWeapons(i);
                                    
ResetPlayerCash(i);
                                    
WantedPoints[i] = 0;
                                    
PlayerInfo[i][pJailTime] = 1200;
                                    
format(stringsizeof(string), "You are jailed for %d seconds.   Bail: Unable"PlayerInfo[i][pJailTime]);
                                    
SendClientMessage(iCOLOR_LIGHTBLUEstring);
                                }
                                new 
playername2[MAX_PLAYER_NAME];
                                
GetPlayerName(iplayername2sizeof(playername2));
                                
account PlayerInfo[i][pAccount];
                                new 
key PlayerInfo[i][pPhousekey];
                                if(
key != 255)
                                {
                                    
rent HouseInfo[key][hRent];
                                    if(
strcmp(playername2HouseInfo[key][hOwner], true) == 0)
                                {
                                    
rent 0;
                                }
                                else if(
rent GetPlayerCash(i))
                                {
                                    
PlayerInfo[i][pPhousekey] = 255;
                                    
SendClientMessage(iCOLOR_WHITE"You have been evicted.");
                                    
rent 0;
                                }
                                
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
                            }
                            new 
tmpintrate;
                            if (
key != 255 && strcmp(playername2HouseInfo[key][hOwner], true) == 0)
                            {
                                if(
PlayerInfo[i][pDonateRank] > 0) { tmpintrate intrate+4; }
                                else { 
tmpintrate intrate+2; }//HouseInfo[key][hLevel]
                            
}
                            else
                            {
                                if(
PlayerInfo[i][pDonateRank] > 0) { tmpintrate 3; }
                                else { 
tmpintrate 1; }
                            }
                            if(
PlayerInfo[i][pPayDay] >= 5)//
                            
{
                                
Tax += TaxValue;//Should work for every player online
                                
PlayerInfo[i][pAccount] -= TaxValue;
                                new 
checks PlayerInfo[i][pPayCheck] / 9// 9
                                
if(PlayerInfo[i][pDonateRank] > 0)
                                {
                                    new 
bonus PlayerInfo[i][pPayCheck] / 10;
                                    
checks += bonus;//where is the givecash thing
                                
}
                                new 
ebill = (PlayerInfo[i][pAccount]/750)*(PlayerInfo[i][pLevel]); //10000 750
                                
new gbill = (PlayerInfo[i][pAccount]/500)*(PlayerInfo[i][pLevel]);
                                
ConsumingMoney[i] = 1;
                                   
PlayerInfo[i][pAccount]=checks+PlayerInfo[i][pAccount];
                                if(
PlayerInfo[i][pAccount] > 0)
                                {
                                    
PlayerInfo[i][pAccount] -= ebill;
                                    
PlayerInfo[i][pAccount] -= gbill;
                                    
SBizzInfo[4][sbTill] += ebill;
                                    
SBizzInfo[4][sbTill] += gbill;
                                }
                                else
                                {
                                    
ebill 0;
                                    
gbill 0;
                                }
                                
interest = (PlayerInfo[i][pAccount]/10000)*(tmpintrate); //1000
                                
PlayerInfo[i][pExp]++;
                                
PlayerPlayMusic(i);
                                
PlayerInfo[i][pAccount] = account+interest;//where it shows the dialog
                                
new coordsstring[1400],paydaydialogstring[1060]; // this botheringggg
                                
formatpaydaydialogstringsizeofpaydaydialogstring ),"{FF0000}|=======================| Salariul |=======================|\n");strcat(coordsstring,paydaydialogstring);
                                
formatpaydaydialogstringsizeofpaydaydialogstring ),"  {AA80FF}Salariul: %dLei\n"checks);strcat(coordsstring,paydaydialogstring);
                                if(
PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
                                {
                                    
formatpaydaydialogstringsizeofpaydaydialogstring ),"  {AA80FF}Curentul: -%dLei\n"ebill);strcat(coordsstring,paydaydialogstring);
                                }
                                if(
PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
                                {
                                    
formatpaydaydialogstringsizeofpaydaydialogstring ),"  {AA80FF}Gazul: -%dLei\n"gbill);strcat(coordsstring,paydaydialogstring);//only i see it not every one here
                                
}
                                if(
PlayerInfo[i][pCredit] > 0)
                                {
                                    new 
getmoney GetPlayerCash(i);
                                    new 
creditoffer = (((PlayerInfo[i][pAccount]) + getmoney)/9500) * (PlayerInfo[i][pLevel]); //750
                                    
new creditt PlayerInfo[i][pCredit];
                                    
PlayerInfo[i][pCredit] = (creditt creditoffer);
                                    
GivePlayerCash(i, -creditoffer);
                                    
formatpaydaydialogstringsizeofpaydaydialogstring ),"  {AA80FF}Credit: -%dLei\n"creditoffer);strcat(coordsstring,paydaydialogstring);
                                }
                                
/*new veh = GetVehicleModel(GetPlayerVehicleID(i));//GetPlayerVehicleID(i);
                                if(CarInfo[veh][cModel] == 560 || CarInfo[veh][cModel] == 451) // i will add more.
                                {
                                    if(CarInfo[i][cDescription] == veh || CarInfo[i][cDescription] == veh || CarInfo[i][cDescription] == veh) //veh ok?
                                     {
                                         GivePlayerCash(i, -100000); //but i think you have a payday like you get 5000 in so much time?nope
                                        SendClientMessage(i, COLOR_WHITE, "  Asigurare Vehicule: -100000Lei");
                                     }
                                 }*/
                                
formatpaydaydialogstringsizeofpaydaydialogstring ),"  {AA80FF}Balanta: %dLei\n"account checks);strcat(coordsstring,paydaydialogstring);
                                
formatpaydaydialogstringsizeofpaydaydialogstring ),"  {AA80FF}Dobanda: 0.%d la suta\n",tmpintrate);strcat(coordsstring,paydaydialogstring);
                                
formatpaydaydialogstringsizeofpaydaydialogstring ),"  {AA80FF}Dobanzile %dLei\n"interest);strcat(coordsstring,paydaydialogstring);
                                
formatpaydaydialogstringsizeofpaydaydialogstring ),"  {AA80FF}Balanta Noua: %dLei\n"PlayerInfo[i][pAccount]);strcat(coordsstring,paydaydialogstring);
                                
formatpaydaydialogstringsizeofpaydaydialogstring ),"  {AA80FF}Chirie: -%dLei\n"rent);strcat(coordsstring,paydaydialogstring);
                                
formatpaydaydialogstringsizeofpaydaydialogstring ),"  {AA80FF}Impozitul: -%dLei\n"TaxValue);strcat(coordsstring,paydaydialogstring);
                                
formatpaydaydialogstringsizeofpaydaydialogstring ),"{FF0000}|==========================================================|\n");strcat(coordsstring,paydaydialogstring);
                                
ShowPlayerDialog(,1DIALOG_STYLE_MSGBOX,"PayDay",coordsstring,"Inchide","");
                                
rent 0;
                                
PlayerInfo[i][pPayDay] = 0;
                                
PlayerInfo[i][pPayCheck] = 0;
                                
PlayerInfo[i][pConnectTime] += 1;
                                if(
PlayerInfo[i][pDonateRank] > 0)
                                {
                                    
PlayerInfo[i][pPayDayHad] += 1;
                                    if(
PlayerInfo[i][pPayDayHad] >= 5)
                                    {
                                        
PlayerInfo[i][pExp]++;
                                        
PlayerInfo[i][pPayDayHad] = 0;
                                    }
                                }
                            }
                            else
                            {
                                
SendClientMessage(iCOLOR_RED"* Nu ai jucat suficient de mult pentru a obtine un cec !"); // i type /test i see payday but they get
                            
}
                        }
                    }
                    }
                    
SaveAccounts();
                    return 
1;
                    } 
Reply
#2

please anyoe help??
Reply
#3

Your getting that message due to the if statement below:

Код:
if(PlayerInfo[i][pPayDay] >= 5)// 
{
}
its lower than 5, set a timer to which it'll make it higher than or equals to 5 within the hour of the paycheck
Reply
#4

i didnt have problems when it was with sendclient..only when its dialog..
Reply
#5

You're not using formats on that message line ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)