15.07.2016, 16:15
pawn Код:
forward payday(playerid);
public payday(playerid)
{
new payday;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))// continue;
{
if(PlayerInfo[playerid][PayDay] == 1)
{
GivePlayerMoney(i, 3500);
SendClientMessage(i, COLOR_GREEN, "_______ BANK OF LOS SANTOS _______ ");
SendClientMessage(i, COLOR_GREEN, "BANK:{FFFFFF} You've received 3500$ from the goverment.");
SendClientMessage(i, COLOR_LIGHTRED, "[ ! ] SERVER: As a new player, with play time: [ 3 ]. You've been given 750$.");
SendClientMessage(i, COLOR_GREEN, "___________________________________");
GameTextForPlayer(i, "~w~PAYDAY, USD 750.", 5000, 4);
PlayerInfo[playerid][PayDay] +=payday;
}
if(PlayerInfo[playerid][PayDay] == 2)
{
GivePlayerMoney(i, 1500);
SendClientMessage(i, COLOR_GREEN, "_______ BANK OF LOS SANTOS _______ ");
SendClientMessage(i, COLOR_GREEN, "BANK:{FFFFFF} You've received 1500$ from the goverment.");
SendClientMessage(i, COLOR_LIGHTRED, "[ ! ] SERVER: As a new player, with play time: [ 2 ]. You've been given 1500$.");
SendClientMessage(i, COLOR_GREEN, "___________________________________");
GameTextForPlayer(i, "~w~PAYDAY, USD 1500.", 5000, 4);
}
if(PlayerInfo[playerid][PayDay] == 3)
{
GivePlayerMoney(i, 750);
SendClientMessage(i, COLOR_GREEN, "_______ BANK OF LOS SANTOS _______ ");
SendClientMessage(i, COLOR_GREEN, "BANK:{FFFFFF} You've received 750$ from the goverment.");
SendClientMessage(i, COLOR_LIGHTRED, "[ ! ] SERVER: As a new player, with play time: [ 3 ]. You've been given 750$.");
SendClientMessage(i, COLOR_GREEN, "___________________________________");
GameTextForPlayer(i, "~w~PAYDAY, USD 750.", 5000, 4);
}
if(PlayerInfo[playerid][PayDay] == 4)
{
GivePlayerMoney(i, 500);
SendClientMessage(i, COLOR_GREEN, "_______ BANK OF LOS SANTOS _______ ");
SendClientMessage(i, COLOR_GREEN, "BANK:{FFFFFF} You've received 500$ from the goverment.");
SendClientMessage(i, COLOR_LIGHTRED, "[ ! ] SERVER: As a normal player, you'll only be given 500$.");
SendClientMessage(i, COLOR_LIGHTRED, "[ ! ] SERVER: If you wish a raisen paycheck. Check forums donation section.");
SendClientMessage(i, COLOR_GREEN, "___________________________________");
GameTextForPlayer(i, "~w~PAYDAY, USD 500.", 5000, 4);
}
printf("SERVER: Payday has been executed. :)");
}
}
return 1;
}
Any help?