[HELP] How I can do this? +REP
#1

Hello, my question is, as I do a command to fill the stock of objects?

How I can do this?

Hello, my question is, as I do a command to fill the stock of objects?

CAUTION: Use
Код:
Update3DTextLabelText
Here I show that by a timmer that is filled every 30 minutes, I want to make a command that the stock is full and also the label information is updated


Код:
new CantidadM = 282000;
Код:
new Text3D:minero;
Код:
minero = Create3DTextLabel("282.000 materiales disponibles para juntar minas", -1,2435.5171,-972.6533,79.3923, 20.0, 0 , 4);
Код:
forward CantidadMinas();
public CantidadMinas()
{
new string[256];
CantidadM --;
format(string,sizeof(string),"%d materiales disponibles para juntar minas",CantidadM);
Update3DTextLabelText(minero, 0xFFFFFFFF, string);
return 1;
}
Код:
forward CamionM();
public CamionM()
{
new string[256];
CantidadM = 282000;
format(string,sizeof(string),"%d materiales disponibles para juntar minas",CantidadM);
Update3DTextLabelText(minero, 0xFFFFFFFF, string);
return 1;
}
// Onplayerupdate
Код:
SetTimer("CamionM",1800000,1);
I Use ZCMD , please help.
Reply
#2

"SetTimer("CamionM",1800000,1);" goto public OnGameModInit
Reply
#3

Quote:
Originally Posted by DarkZeroX
Посмотреть сообщение
"SetTimer("CamionM",1800000,1);" goto public OnGameModInit
__________________________________________________ __________________________________

Thanks, but as you could make a command to fill the stock? Can you help me?
Reply
#4

PHP код:
#define MAX_CANTIDAD 282000

new CantidadM MAX_CANTIDAD;
new 
Text3D:minero;


public 
OnGameModInit()
{
    
minero Create3DTextLabel("282.000 materiales disponibles para juntar minas", -1,2435.5171,-972.6533,79.392320.04);
    
SetTimer("CamionM",1800000,1);
    return 
1;
}

forward CamionM();
public 
CamionM()
{
    new 
string[256];

    
CantidadM MAX_CANTIDAD;

    
format(string,sizeof(string),"%d materiales disponibles para juntar minas",CantidadM);
    
Update3DTextLabelText(minero0xFFFFFFFFstring);
    return 
1;
}

forward CantidadMinas();
public 
CantidadMinas()
{
    new 
string[256];
    
CantidadM --;

    
format(string,sizeof(string),"%d materiales disponibles para juntar minas",CantidadM);
    
Update3DTextLabelText(minero0xFFFFFFFFstring);
    return 
1;
}

CMD:Cantidad(playeridparams[])
{
     
CantidadMinas();
     return 
1;

Reply
#5

Thanks, but instead of climbing the value decreases, (In Update3DTextLabelText) to do?


Whenever I use CMD: amount, what it does is subtract 1 on 1
Reply
#6

PHP код:
forward CantidadMinas();
public 
CantidadMinas()
{
    new 
string[256];
    
CantidadM++;

    
format(string,sizeof(string),"%d materiales disponibles para juntar minas",CantidadM);
    
Update3DTextLabelText(minero0xFFFFFFFFstring);
    return 
1;

Reply
#7

This is a work in my gamemode, whenever you pick the item stock is subtracted, understand? Therefore I can not use the + + in CantidadM++ (Forward CantidadMinas)
Reply
#8

hmm, ++ = +1 | -- = -1 or -=number

PHP код:
forward CantidadMinas();
public 
CantidadMinas()
{
    new 
string[256];
    if(
CantidadM MAX_CANTIDAD) return 1;
    
CantidadM++;
    
format(string,sizeof(string),"%d materiales disponibles para juntar minas",CantidadM);
    
Update3DTextLabelText(minero0xFFFFFFFFstring);
    return 
1;



Sorry bad English :/
Reply
#9

If you use any stock that does not subtract the time to go look for when people realizen his work, I understand?
Reply
#10

I'm sorry I'm french I do not understand :/
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)