#1

Hello i need a CMD whith:

/fire ---> CreateExplosion here no probs but i would like to repeat the explosion every 10 secons Until i write
/Stopfire +REP
Reply
#2

Shouldn't post command requests as a thread, but in the thread "Script Request Thread #5".

Then again, here's an example (NOTICE: Untested)

pawn Код:
// Somewhere at the top, preferably near the defines and such.
forward firetimer();
new firetimer2;

//Somewhere else

CMD:fire(playerid, params[])
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    CreateExplosion(x, y, z, 9, 10.0);
    firetimer2 = SetTimer("firetimer", 10000, true);
    return 1;
}
CMD:stopfire(playerid, params[])
{
    KillTimer(firetimer2);
    return 1;
}

public firetimer()
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    CreateExplosion(x, y, z, 9, 10.0);
}
Also, realize i'm using ZCMD, just incase you need a different command processor, please tell me which one you use and I will switch it, or if you actually know some scripting, do it yourself.

Like I said, just an example, you didn't specify much that you wanted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)