08.10.2016, 22:09
+3 de score a cada payday vip sem vip normal
#define MinutosPayDay 10 // a cada 10 minutos public OnGameModeInit() { SetTimer("pagamento", MinutosPayDay * 60000, true); return true; } forward pagamento(); public pagamento() { for(new i = 0; i != MAX_PLAYERS; ++i) if(IsPlayerConnected(i)) { SetPlayerScore(i, GetPlayerScore(i) + 3); //Oque mais Quiser... } return SendClientMessageToAll(-1, "Vocк ficou 10 minutos, Online e recebeu o Payday.); } |
#define SALARIO_VIP 300000 #define SCORE_VIP 3 @PayDay() { for(new i; i <= HighestID; i++) { if(IsPlayerConnected(i)) { if(Player[i][pLogged] == true) { if(GetPlayerMoney(i) <= 0) { ResetPlayerMoney(i); } if(Player[i][DelayNick] > 0) { Player[i][DelayNick] --; } new var10[128], salario; SendClientMessage(i, 0xE3E3E3FF, " "); SendClientMessage(i, TEXTO, "{e8e8e8}|-------------{00FFFF}[ LEVEL UP ]{e8e8e8}--------------|"); PlayerPlaySound(i,1057,0.0,0.0,0.0); if(Player[i][pVip] == 1){salario = SALARIO_VIP; } else {salario = SALARIO; } format(var10, 30000, "{00FFFF}Salбrio:{e8e8e8} R$%d", salario); SendClientMessage(i, 0xE3E3E3FF, var10); if(Player[i][pVip] == 1){score = SCORE_VIP; } else {score = SCORE; } GivePlayerMoney(i, salario); SetPlayerScore(i, GetPlayerScore(i) + 1); SendClientMessage(i, 0xFFFFFFAA, "|------------------------------------------|"); SendClientMessage(i, 0xE3E3E3FF, var10); format(var10, 256, "{00FFFF}Vocк foi para o level {e8e8e8}%d!", GetPlayerScore(i)); SendClientMessage(i, 0xE3E3E3FF, var10); SendClientMessage(i, 0xFFFFFFAA, "|------------------------------------------|"); SalvarPlayer(i); } } } }
#define SALARIO_VIP 300000
#define SCORE_VIP 3
if(Player[i][pVip] == 1){score = SCORE_VIP; } else {score = SCORE; } // Adicione isso no seu sistema de payday ( acho que vai funcionar, nгo sei)
Код:
#define SALARIO_VIP 300000 #define SCORE_VIP 3 @PayDay() { for(new i; i <= HighestID; i++) { if(IsPlayerConnected(i)) { if(Player[i][pLogged] == true) { if(GetPlayerMoney(i) <= 0) { ResetPlayerMoney(i); } if(Player[i][DelayNick] > 0) { Player[i][DelayNick] --; } new var10[128], salario; SendClientMessage(i, 0xE3E3E3FF, " "); SendClientMessage(i, TEXTO, "{e8e8e8}|-------------{00FFFF}[ LEVEL UP ]{e8e8e8}--------------|"); PlayerPlaySound(i,1057,0.0,0.0,0.0); if(Player[i][pVip] == 1){salario = SALARIO_VIP; } else {salario = SALARIO; } format(var10, 30000, "{00FFFF}Salбrio:{e8e8e8} R$%d", salario); SendClientMessage(i, 0xE3E3E3FF, var10); if(Player[i][pVip] == 1){score = SCORE_VIP; } else {score = SCORE; } GivePlayerMoney(i, salario); SetPlayerScore(i, GetPlayerScore(i) + 1); SendClientMessage(i, 0xFFFFFFAA, "|------------------------------------------|"); SendClientMessage(i, 0xE3E3E3FF, var10); format(var10, 256, "{00FFFF}Vocк foi para o level {e8e8e8}%d!", GetPlayerScore(i)); SendClientMessage(i, 0xE3E3E3FF, var10); SendClientMessage(i, 0xFFFFFFAA, "|------------------------------------------|"); SalvarPlayer(i); } } } } @EDIT Ou faзa assim PHP код:
PHP код:
|