Some Help With /Fire
#1

Hi Guys Again xD I made This Commandґs
Top
pawn Код:
new Fire;
new FireLock[MAX_PLAYERS];
new LoadLock[MAX_PLAYERS];
forward FireUnlock(playerid);
forward LoadUnlock(playerid);
Load Fire Work Command
pawn Код:
if(strcmp(cmdtext, "/load", true)==0)
{
    if(LoadLock[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_YELLOW, "FireWork Was Succful Placed");
  GameTextForPlayer(playerid,"~r~FireWork ~y~Was ~g~Succful Placed",2500,5);
  Fire = CreateObject(3786, 1525.999512, -1346.289795, 330.407990, 346.2490, 90.2408, 71.1785);

        LoadLock[playerid] = 1;
        SetTimerEx("LoadUnlock", 120000, 0, "i", playerid);
    }
    else if(LoadLock[playerid] == 1)
    SendClientMessage(playerid, COLOR_RED, "Omg U Can ONLY Load FireWorks every 2MIN!");
    {
        return 0;
    }
}
Shoot Fire Work
pawn Код:
if(strcmp(cmdtext, "/fire", true)==0)
{
    if(FireLock[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_YELLOW, "FireWork Was Succful Shooted");
  GameTextForPlayer(playerid,"~r~FireWork ~y~Was ~g~Succful Shooted",2500,5);
  MoveObject(Fire, 1526.262329, -1346.088379, 402.466187,9.0);
  CreateExplosion(1526.262329, -1346.088379, 402.466187,6,300);
  DestroyObject(Fire);

        FireLock[playerid] = 1;
        SetTimerEx("FireUnlock", 120000, 0, "i", playerid);
    }
    else if(FireLock[playerid] == 1)
    SendClientMessage(playerid, COLOR_RED, "Omg U Can ONLY Shoot FireWorks every 2MIN!");
    {
        return 0;
    }
}
Under all
pawn Код:
public FireUnlock(playerid)
{
    FireLock[playerid] = 0;
}
pawn Код:
public LoadUnlock(playerid)
{
    LoadLock[playerid] = 0;
}
But when i do /fire I hear BOOM! And it Fly a little And deletes but i donґt see the Explosion I want like a timer But dont know how to make it Like /Fire W8 1 sec BOOM And the fire work get deleted AND Btw

AND Btw: And when i type /fire It stands Unknown command and /load he same but it work perfectly
And i have other commands like that to that work but i get unknown command whats wrong with that?
Reply
#2

Код:
forward Firework(); // on top 

SetTimer("Firework",2000,0); // in your cmd

public Firework()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetPlayerPos(i,X,Y,Z);
SetPlayerFacingAngle(i,000.000);
SetCameraBehindPlayer(i);
CreateExplosion(1526.262329, -1346.088379, 402.466187,6,300);	
}
}
}
Here man try something with this im sure it helps u if u still need things after this i help u tomorow i need 2 go im in a rush...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)