15.07.2016, 02:21
Create a forloop to check if the player is connected.
Try this..
PHP код:
forward payday(playerid);
public payday(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))// continue;
{
GivePlayerMoney(i, 1000);
SendClientMessage(i, COLOR_GREEN, "_______ BANK OF LOS SANTOS _______ ");
SendClientMessage(i, COLOR_GREEN, "BANK:{FFFFFF} You've received 500$ from the goverment.");
SendClientMessage(i, COLOR_GREEN, "___________________________________");
GameTextForPlayer(i, "~w~PAYDAY, USD 500.", 5000, 4);
SetTimerEx("payday", 560, true, "i", playerid);
printf("SERVER: Payday has been executed. :)");
return 1;
}