01.05.2012, 17:32
meu sistema de salario era um eu mudei o relogio pra horario certo queria coloca pro cara ganhar o salario em 1 hora certinha de jogo poderia mi ajudar ?
Код HTML:
public Usoudroga() { minu++; if (horas == 0) { SetWorldTime(0); } if (minu >= 59) { minu = 0; horas++; SetWorldTime(horas); } if (horas > 23) { horas = 0; } new string[128]; if (minu <= 9) { format(string, 25, "~w~%d:0%d", horas, minu); } else { format(string, 25, "~w~%d:%d", horas, minu); } //Salariooooooooooo if (horas == 00 && minu == 5) { Up(); } for (new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { // ResetPlayerMoney(i); GivePlayerMoney(i, GetPlayerGrana(i)); GetPlayerPos(i, PlayerCurrentPos[0], PlayerCurrentPos[1], PlayerCurrentPos[2]); if (!floatcmp(PlayerCurrentPos[0], PlayerLastPos[i][LastX]) && !floatcmp(PlayerCurrentPos[1], PlayerLastPos[i][LastY])) { PlayerAfkTicks[i]++; } else { PlayerAfkTicks[i] = 0; } PlayerLastPos[i][LastX] = PlayerCurrentPos[0]; PlayerLastPos[i][LastY] = PlayerCurrentPos[1]; PlayerLastPos[i][LastZ] = PlayerCurrentPos[2]; if (PlayerAfkTicks[i] == MAX_IDLE_TIME * 60) { AFK[i] = 1; SendClientMessage(i, 0x11B1FFAA, "============================================================================================="); SendClientMessage(i, 0x11B1FFAA, "Voзк foi impedido de jogar e upar (Motivo ficou 5 minutos sem se mecher volte para o jogo Use: /on"); SendClientMessage(i, 0x11B1FFAA, "============================================================================================="); SetPlayerVirtualWorld(i, 1); SetCameraBehindPlayer(i); TogglePlayerControllable(i, 0); TextDrawShowForPlayer(i, AfkText); TextDrawShowForPlayer(i, AfkBackText); } // new aname[MAX_PLAYER_NAME]; GetPlayerName(i, aname, sizeof(aname)); format(file, sizeof(file), PASTA_CONTAS, aname); new Float: health; GetPlayerHealth(i, health); if (dini_Int(file, "usoudroga") == 1) { SetPlayerHealth(i, health - 1); } } } } public Atualizartempo() { gettime(HoraRoYal, MinutosRoYal); format(StringRoYalTempo,32,"%02d:%02d",HoraRoYal,MinutosRoYal); TextDrawSetString(TempoRoYal,StringRoYalTempo); SetWorldTime(HoraRoYal); new x=0; while(x!=MAX_PLAYERS) { if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) { SetPlayerTime(x,HoraRoYal,MinutosRoYal); } x++; } }