23.03.2013, 09:30
pawn Код:
forward PayDay();
public PayDay()
{
gettime(hour, minute);
if(minute == 00) //you said you want on 00 so i changed to that instead of 20
{
new ExpGain, MoneyGain;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue; //skip this iteration since they aren't connected
if(PlayerInfo[i][pDonateRank] > 4)
{
GivePlayerMoney(i,30000);
PlayerInfo[i][Exp] += 3; //you know this is going to short the players with rank 3+ on their team or w/e right
}
else
{
new String[128],
nxtlevel = PlayerInfo[i][Level],
payday = nxtlevel*0; //this is always going to be 0...when you multiply any number by 0, it becomes 0
GivePlayerMoney(i,payday); //will give them $0 because of the reason said above
PlayerInfo[i][Exp]++;
GameTextForPlayer(i,"~p~ PayDay",6,5000);
format(String, sizeof(String), "????? ????:%d $", payday);
SendClientMessage(i,COLOR_GREEN,String);
if(PlayerInfo[i][pMember] == TEAM_BALLAS && PlayerInfo[i][pRank] == 6)
{
GivePlayerMoney(i,10000);
PlayerInfo[i][Exp] += 6;
SendClientMessage(i,COLOR_GREEN,"Rolling Height Ballas:6 Exp,$10000");
}
if(PlayerInfo[i][pMember] == TEAM_BRAIN)
{
if(PlayerInfo[i][pRank]==6)
{
MoneyGain=15000;
ExpGain=8;
}
else //Below is the same thing you were doing before basically just a bit better on the eyes
{
ExpGain=PlayerInfo[i][pRank]+1;
MoneyGain=ExpGain*1000;
}
GivePlayerMoney(i, MoneyGain);
new string[128];
format(string, sizeof(string), "No Brain: %i Exp, $%i", ExpGain, MoneyGain);
SendClientMessage(i,COLOR_GREEN,string);
}
//Idk what this part is for
SendClientMessage(i,COLOR_GREEN,"????? Exp:1 Exp");
format(String, sizeof(String), "???? ???? ????:%d $", PlayerInfo[i][pCash]);
SendClientMessage(i,COLOR_GREEN,String);
}
}
}
}
Try this out though (change 00 to whatever the next minute is for you or somethin)