Some Help With /Fire - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Some Help With /Fire (
/showthread.php?tid=25682)
Some Help With /Fire -
splitx - 09.02.2008
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?
Re: Some Help With /Fire -
EnerG - 17.02.2009
Код:
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...