[Ajuda] Level Up
#1

queria qui alguem mi fala como colocar pro cara upar so de 1 em 1 hora no tempo real

Код HTML:
public LevelUP()
{
	for (new i = 0; i < MAX_PLAYERS; i++)
	{
		if (IsPlayerConnected(i))
		{
			new string[128];
			new aname[MAX_PLAYER_NAME];
			GetPlayerName(i, aname, MAX_PLAYER_NAME);
			format(file, sizeof(file), PASTA_CONTAS, aname);
			if (AFK[i] == 0)
			{
				dini_IntSet(file, "Tempo", dini_Int(file, "Tempo") + 1);
			}
			//EXP==========================================================================================
			if (dini_Int(file, "Tempo") >= 10)
			{
				dini_IntSet(file, "EXP", dini_Int(file, "EXP") + 1);
				format(string, sizeof(string), "{6666FF}(INFO) {FFFFFF}Vocк ganhou {00FF00}+1 {FFFFFF}de respeito. {00FF00}(%d)", dini_Int(file, "EXP"));
				PlayerPlaySound(i, 1057, 0, 0, 0);
				SendClientMessage(i, 0x75EA00AA, string);
				dini_IntSet(file, "Tempo", 0);
			}
			//LEVEL UP=====================================================================================
			if (dini_Int(file, "EXP") >= 6)
			{
				dini_IntSet(file, "Level", dini_Int(file, "Level") + 1);
				format(string, sizeof(string), "{6666FF}(INFO) {FFFFFF}Vocк ajuntou {00FF00}6 {FFFFFF}de respeito, e ganhou {00FF00}+1 {FFFFFF}level. {00FF00}(%d) ", dini_Int(file, "Level"));
				SendClientMessage(i, 0x75EA00AA, string);
				PlayerPlaySound(i, 1057, 0, 0, 0);
				dini_IntSet(file, "EXP", 0);
				dini_IntSet(file, "rouboubanco", 0);
				jasequestro[i] = 0;
			}
			//================================Outros===================================
			if (dini_Int(file, "Preso") == 1)
			{
				Preso[i]++;
				format(string, sizeof(string), "{6666FF}(INFO) {00FF00}1 {FFFFFF}minuto se passou, vocк estб preso {6666FF}%d/5 {FFFFFF}minutos!", Preso[i]);
				SendClientMessage(i, verdel, string);
				if (Preso[i] >= 5)
				{
					Preso[i] = 0;
					dini_IntSet(file, "Preso", 0);
					SetPlayerHealth(i, 100);
					SpawnPlayer(i);
					dini_IntSet(file2, "ofmaconha", 0);
					dini_IntSet(file2, "ofcocaina", 0);
					dini_IntSet(file2, "ofcrack", 0);
					dini_IntSet(file, "usoudroga", 0);
					dini_IntSet(file, "tmaconha", 0);
					dini_IntSet(file, "tcrack", 0);
					dini_IntSet(file, "tcocaina", 0);
					dini_IntSet(file, "maconha", 0);
					dini_IntSet(file, "crack", 0);
					dini_IntSet(file, "cocaina", 0);
					SendClientMessage(i, Vermelho, "Vocк foi solto, nгo cometa mais crimes.");
				}
			}
		}
	}
}
Reply
#2

Olhe seu outro Topico . : https://sampforum.blast.hk/showthread.php?tid=339004
pawn Код:
//EXP==========================================================================================
            if (dini_Int(file, "Tempo") >= 10) // Aqui o tempo que ele Upa. 1 = um minuto 60 uma hora,
            {
                dini_IntSet(file, "EXP", dini_Int(file, "EXP") + 1);
                format(string, sizeof(string), "{6666FF}(INFO) {FFFFFF}Vocк ganhou {00FF00}+1 {FFFFFF}de respeito. {00FF00}(%d)", dini_Int(file, "EXP"));
                PlayerPlaySound(i, 1057, 0, 0, 0);
                SendClientMessage(i, 0x75EA00AA, string);
                dini_IntSet(file, "Tempo", 0);
            }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)