[Ajuda] Ajuda fazer sistema de salario?
#1

Bom galera eu fiz um textdraw de UP no caso queria um salario de 15 em 15 minutos ganharia 1 Experiençia e com 15 experiençia ganharia 1 level, na imagem abaixo vocês verá o textdraw que criei, eu queria que esse tempo começa-se a contar mais ir diminuindo. Por exemplo está 15:00 , 14:59 , 14:58 14:57 ETÇ ai quando chegar no 00:00 ganhar á experiençia e resetar para 15 denovo alguem porfavor poderia me ajudar? Queria muito fazer esse sistema.


Imagem

https://imgur.com/a/JJEwMk0
Reply
#2

Crie um timer a cada 1 segundo para diminuir a contagem.
Ao chegar a 0, vocк coloca novamente 15 minutos.
Reply
#3

Cara eu estou pedindo ajuda porque não sei entende. Não podeia me ajudar?
Reply
#4

Quote:
Originally Posted by PaizaoPlays
Посмотреть сообщение
Cara eu estou pedindo ajuda porque nгo sei entende. Nгo podeia me ajudar?
https://forum.sa-mp.com/showpost.php...35&postcount=8

Adapte conforme o seu uso.
Reply
#5

Quote:

new Text:TDEditor_TD[3];

TDEditor_TD[0] = TextDrawCreate(77.558792, 425.368743, "15:00");
TextDrawLetterSize(TDEditor_TD[0], 0.400000, 1.600000);
TextDrawAlignment(TDEditor_TD[0], 1);
TextDrawColor(TDEditor_TD[0], -1);
TextDrawSetShadow(TDEditor_TD[0], 0);
TextDrawSetOutline(TDEditor_TD[0], 0);
TextDrawBackgroundColor(TDEditor_TD[0], 255);
TextDrawFont(TDEditor_TD[0], 1);
TextDrawSetProportional(TDEditor_TD[0], 1);
TextDrawSetShadow(TDEditor_TD[0], 0);

TDEditor_TD[1] = TextDrawCreate(50.423583, 425.152618, "UP:");
TextDrawLetterSize(TDEditor_TD[1], 0.400470, 1.600000);
TextDrawAlignment(TDEditor_TD[1], 1);
TextDrawColor(TDEditor_TD[1], -1);
TextDrawSetShadow(TDEditor_TD[1], 0);
TextDrawSetOutline(TDEditor_TD[1], 0);
TextDrawBackgroundColor(TDEditor_TD[1], 255);
TextDrawFont(TDEditor_TD[1], 1);
TextDrawSetProportional(TDEditor_TD[1], 1);
TextDrawSetShadow(TDEditor_TD[1], 0);
TextDrawSetSelectable(TDEditor_TD[1], true);

TDEditor_TD[2] = TextDrawCreate(46.329319, 426.750610, "box");
TextDrawLetterSize(TDEditor_TD[2], 0.000000, 1.85881;
TextDrawTextSize(TDEditor_TD[2], 120.799926, 0.000000);
TextDrawAlignment(TDEditor_TD[2], 1);
TextDrawColor(TDEditor_TD[2], -1);
TextDrawUseBox(TDEditor_TD[2], 1);
TextDrawBoxColor(TDEditor_TD[2], 1768515945);
TextDrawSetShadow(TDEditor_TD[2], 0);
TextDrawSetOutline(TDEditor_TD[2], 0);
TextDrawBackgroundColor(TDEditor_TD[2], 255);
TextDrawFont(TDEditor_TD[2], 2);
TextDrawSetProportional(TDEditor_TD[2], 0);
TextDrawSetShadow(TDEditor_TD[2], 0);

Sou novo em PAWNO sabe, esse ai é o Textdraw lá poderia ajeitar para mim apenas colocar no servidor ia me ajudar muito eu acho mais façil para mim aprender depois.
Reply
#6

Quote:
Originally Posted by PaizaoPlays
Посмотреть сообщение
Sou novo em PAWNO sabe, esse ai й o Textdraw lб poderia ajeitar para mim apenas colocar no servidor ia me ajudar muito eu acho mais faзil para mim aprender depois.
Isso й sу mais uma desculpa pra ganhar cуdigos prontos.

PHP код:
new
    
UpTimer[MAX_PLAYERS],
    
PlayerUpCount[MAX_PLAYERS],
    
PlayerExperience[MAX_PLAYERS]
;
public 
OnPlayerDisconnect(playeridreason)
{
    
KillTimer(UpTimer[playerid]);
    
PlayerUpCount[playerid] = -1;
    
PlayerExperience[playerid] = 0;
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
UpTimer[playerid] = SetTimerEx("PlayerUPTimer"1000true"d"playerid);
    return 
1;
}
forward PlayerUPTimer(playerid);
public 
PlayerUPTimer(playerid)
{
    
PlayerUpCount[playerid]--;
    new 
str[19];
    
format(strsizeof(str), "UP: %02d:%02d:%02d"PlayerUpCount[playerid]/3600, (PlayerUpCount[playerid] % 3600)/60PlayerUpCount[playerid] % 60);
    
PlayerTextDrawSetString(playeridPlayerText:textstr);
    if(
PlayerUpCount[playerid] <= 0)
    {
        
SendClientMessage(playerid, -1"UP");
        
PlayerExperience[playerid]++;
        
PlayerUpCount[playerid] = 900;
    }
    return 
1;

agora sу colocar a textdraw ai, boa sorte.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)