Processing Payday Code For Everybody Problem(Timer,playerid)
#4

PHP код:
forward payday();
public 
payday()
{
    new 
savingsmoney,Text[200],bankmoney;
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if (!
INGAME[i][LOGIN]) {
        
format(Text,sizeof(Text),"You Need To Login Before Doing Anything.");
        
SendClientMessage(i,COLOR_RED,Text);
        }
        else {
            
USER[i][EXP] = USER[i][EXP]+1;
            
savingsmoney = (USER[i][SAVINGS]/100)*5;
            
bankmoney = (USER[i][BANK]/100)*2;
            
USER[i][SAVINGS] = USER[i][SAVINGS]+savingsmoney;
            
USER[i][BANK] = USER[i][BANK]+bankmoney;
            
format(Text,sizeof(Text),"---------------------------------------------");
            
SendClientMessage(i, -1Text);
            
format(Text,sizeof(Text),"You Have Earned 1 Experience Point On PayDay");
            
SendClientMessage(i, -1Text);
            
format(Text,sizeof(Text),"Your New Bank Balance Is: %d",USER[i][BANK]);
            
SendClientMessage(i, -1Text);
            
format(Text,sizeof(Text),"Your New Savings Balance Is: %d",USER[i][SAVINGS]);
            
SendClientMessage(i, -1Text);
            
format(Text,sizeof(Text),"---------------------------------------------");
            
SendClientMessage(i, -1Text);
        }    
        }
    }
    
    return 
1;

Try this.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)