Small problem with my payday (+rep)
#1

Fixed!
Reply
#2

"&&" Is for statement.
Код:
           if(ServerHour == 18)
           {
		if(ServerMinute == 00) 
                {
                    Payday();
                    SendClientMessageToAll(-1, "{00FFEE}[ PAYDAY: Thank you for playing San Andreas - Gang War, and you have received your payday. ]");
                }
           }
Код:
        if(ServerDay == 06)
           if(ServerHour == 10)
              if(ServerMinute == 31)
              {
                 totallotto=25000;
                 SendClientMessageToAll(-1, "{B7FF00}[ LOTTERY NOTIFICATION: The lottery has been reset back to $25000! ]");
              }
Reply
#3

Fixed!
Reply
#4

Fixed!
Reply
#5

Payday function works fine only the Game Text is not working well. I've tried it with SendClientMessage(i, -1, string); and it worked so you have to change GameTextForAll to SendClientMessage.
Another thing, you wrote GameTextForAll and this is a fault you should use GameTextForPlayer but not in this case.
Here is the code:
Код:
public Payday()
{
    new string[256];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        new payday = GetPlayerScore(i)*10; //Depends on player's score.
        format(string,sizeof(string),"Payday: You have recieved $%i", payday);
		SendClientMessage(i,-1, string);
        GivePlayerMoney(i,payday);
    }
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)