Making admin command
#7

Quote:
Originally Posted by Zeus666
Посмотреть сообщение
Код HTML:
forward Airdrop();
public Airdrop()
{

    Delete3DTextLabel(airlabel);
    DestroyObject(air);

    airlabel = Create3DTextLabel("{fff700}AIRDROP:{ffffff}This packcage has \many weapons",0xFFFFFF,306.42618, 2026.72473, 16.73662, 30, 0);

    air = CreateObject(18849, -223.3057, 991.9159, 45.1256, 0.00000, 0.00000, 0.00000);
    MoveObject(air, -222.0864, 992.7004, 19.5774, 3.0);

    for(new i=0; i < MAX_PLAYERS; i++)
    {
        DisablePlayerCheckpoint(i);
        SetPlayerCheckpoint(i, -222.0864,992.7004,19.5774,3);
    }

    SendClientMessageToAll(-1, "{ff0000}[AIRDROP]: {ffffff}Airdrop is on Fort Carson Sherrif Department.");
    printf(" ");

    new hora, minuto, segundo; gettime(hora,minuto,segundo);
    printf("> [AIRDROP]:Airdrop is on Fort Carson Sherrif Department: Ora: [%i/%i/%i]", hora, minuto, segundo);
    return 1;
}

And, I want a command of /airdrop which automatically gives the airdrop without reseting or changing timer of airdrop
You want the command to spawn ONE airdrop?

The "SetTimer" function work like this...
PHP код:
SetTimer("Name of function you want to run"interval in millisecondstrue or false if it is a repeating timer); 
So in other words, either just remove the timer in the command all together since you're still spawning it in 1 millisecond. That way you won't need to worry about canceling or "refreshing" any timer. Just call
PHP код:
Airdrop(); 
instead of
PHP код:
SetTimer("Airdrop"1true); 
and you will evade the problem.
Reply


Messages In This Thread
Making admin command - by Zeus666 - 22.01.2018, 09:16
Re: Making admin command - by coool - 22.01.2018, 09:44
Re: Making admin command - by Zeus666 - 22.01.2018, 10:49
Re: Making admin command - by Inn0cent - 22.01.2018, 10:52
Re: Making admin command - by Zeus666 - 22.01.2018, 15:04
Re: Making admin command - by MarikAshtar - 22.01.2018, 15:17
Re: Making admin command - by MarikAshtar - 22.01.2018, 15:38
Re: Making admin command - by Zeus666 - 22.01.2018, 15:46
Re: Making admin command - by Rolux - 22.01.2018, 15:53
Re: Making admin command - by Zeus666 - 22.01.2018, 15:56

Forum Jump:


Users browsing this thread: 1 Guest(s)