15.06.2012, 08:33
Hello! I am Russian, so I apologize for my mistakes, I do not know very well English. Help please write a function call Public exactly %d:00 minutes. And then I had a little constipation.
Hello! I am Russian, so I apologize for my mistakes, I do not know very well English. Help please write a function call Public exactly %d:00 minutes. And then I had a little constipation.
|
//Anywhere in script but not in a callback
forward PayDay();
public PayDay()
{
new hour, minute;
gettime(hour, minute);
if(minute == 0)
{
//Payday code here
}
}
//GameModeInit
SetTimer("PayDay", 1000, true);
pawn Код:
|
forward PayDay();
public PayDay()
{
new hour, minute;
gettime(hour, minute);
if(minute == 0)
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
GivePlayerMoney(i, 5000);
}
}
}
public PayDay() {
new hour,
minutes,
second;
gettime(hour, minutes, second);
if(minutes == 0) {
for(new i = 0; i<MAX_PLAYERS; i++) {
new exp = playerVariable[i][aLevel]*4+4;
if(playerVariable[aExp] == exp) {
playerVariable[i][aLevel]++;
}
GivePlayerMoney(i, paycheck); // paycheck - Global Variable
}
}
}
Example on " //PayDay code here " space
pawn Код:
|
This is my PayDay Code:
PHP код:
|