29.06.2015, 18:31
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:
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; }