about fireworks system..not a error..ask..
#1

I want to put fireworks system but i don't know where to put this:
Код:
GetPlayerNameEx(playerid) {
 
        new     sz_playerName[MAX_PLAYER_NAME], i_pos;
 
        GetPlayerName(playerid, sz_playerName, MAX_PLAYER_NAME);
        while ((i_pos = strfind(sz_playerName, "_", false, i_pos)) != -1) sz_playerName[i_pos] = ' ';
        return sz_playerName;
}
this one http://pastebin.com/RDXHm51h
+
Код:
forward Firework(i);
public Firework(i)
{
        new Float:x, Float:y, Float:z;
        x = rx[i];
        y = ry[i];
        z = rz[i];
        z += RocketHeight;
        if (RocketExplosions[i] == 0)
        {
            DestroyDynamicObject(Rocket[i]);
            DestroyDynamicObject(RocketLight[i]);
            DestroyDynamicObject(RocketSmoke[i]);
            CreateExplosion(x ,y, z, 4, 10);
            CreateExplosion(x ,y, z, 5, 10);
            CreateExplosion(x ,y, z, 6, 10);
        }
        else if (RocketExplosions[i] >= MAX_FIREWORKS)
        {
            for (new j = 0; j <= RocketSpread; j++)
            {
                CreateExplosion(x + float(j - (RocketSpread / 2)), y, z, 7, 10);
                CreateExplosion(x, y + float(j - (RocketSpread / 2)), z, 7, 10);
                CreateExplosion(x, y, z + float(j - (RocketSpread / 2)), 7, 10);
            }
            RocketExplosions[i] = -1;
            FireworkTotal = 0;
            Fired = 0;
            return 1;
        }
        else
        {
                x += float(random(RocketSpread) - (RocketSpread / 2));
                y += float(random(RocketSpread) - (RocketSpread / 2));
                z += float(random(RocketSpread) - (RocketSpread / 2));
            CreateExplosion(x, y, z, 7, 10);
        }
        RocketExplosions[i]++;
        SetTimerEx("Firework", 250, 0, "i", i);
        return 1;
}
Pleas i want to know i don't want to get errors because 2 days i was fixing error y_scripting fatal error
Reply
#2

Put that out of any public..
Put in end of script.
Reply
#3

I Think move this Filterscript So simple , But dont Confused with this code xD
PHP код:
//This your gamemode
#include <a_samp>
#include <zcmd> // Added This include on your top gamemode
#include <sscanf2> // Added This include on your top gamemode
#include <foreach> // Added This include on your top gamemode
#include <streamer> // Added This include on your top gamemode
#define RocketHeight 70
#define RocketSpread 30
#define MAX_LAUNCH 20 
#define MAX_FIREWORKS 100 
#define COLOR_YELLOW 0xFFFF00AA 
new Rocket[MAX_LAUNCH];
new 
RocketLight[MAX_LAUNCH];
new 
RocketSmoke[MAX_LAUNCH];
new 
RocketExplosions[MAX_LAUNCH];
new 
Float:rx[MAX_LAUNCH];
new 
Float:ry[MAX_LAUNCH];
new 
Float:rz[MAX_LAUNCH];
new 
FireworkTotal;
new 
Fired;
public 
OnGameModeInit()
{
    
// Your code
    
return 1;
}
public 
OnGameModeExit()
{
    
//your Code
    
return 1;
}
GetPlayerNameEx(playerid) {
        new     
sz_playerName[MAX_PLAYER_NAME], i_pos;
        
GetPlayerName(playeridsz_playerNameMAX_PLAYER_NAME);
        while ((
i_pos strfind(sz_playerName"_"falsei_pos)) != -1sz_playerName[i_pos] = ' ';
        return 
sz_playerName;
}
forward Firework(i);//This forward Fucntion To make a public Firework or You can move this to top gamemode
public Firework(i)// Dont Put This to another public but put this to A blank space
{
        new 
Float:xFloat:yFloat:z;
        
rx[i];
        
ry[i];
        
rz[i];
        
+= RocketHeight;
        if (
RocketExplosions[i] == 0)
        {
            
DestroyDynamicObject(Rocket[i]);
            
DestroyDynamicObject(RocketLight[i]);
            
DestroyDynamicObject(RocketSmoke[i]);
            
CreateExplosion(,yz410);
            
CreateExplosion(,yz510);
            
CreateExplosion(,yz610);
        }
        else if (
RocketExplosions[i] >= MAX_FIREWORKS)
        {
            for (new 
0<= RocketSpreadj++)
            {
                
CreateExplosion(float(- (RocketSpread 2)), yz710);
                
CreateExplosion(xfloat(- (RocketSpread 2)), z710);
                
CreateExplosion(xyfloat(- (RocketSpread 2)), 710);
            }
            
RocketExplosions[i] = -1;
            
FireworkTotal 0;
            
Fired 0;
            return 
1;
        }
        else
        {
                
+= float(random(RocketSpread) - (RocketSpread 2));
                
+= float(random(RocketSpread) - (RocketSpread 2));
                
+= float(random(RocketSpread) - (RocketSpread 2));
            
CreateExplosion(xyz710);
        }
        
RocketExplosions[i]++;
        
SetTimerEx("Firework"2500"i"i);
        return 
1;
}
CMD:placefirework(playeridparams[])//Put this to blank space
{
        if(
FireworkTotal == MAX_LAUNCH)
        {
            
SendClientMessage(playerid0xFFFFFFAA"ERROR:{FFFFFF}You have reached maximum number of fireworks! Max 20!");
            return 
1;
        }
        if(
Fired == 1)
        {
            
SendClientMessage(playerid0xFFFFFFAA"ERROR:{FFFFFF}Wait till your fireworks are done before placing new ones!");
            return 
1;
        }
        new 
string[128];
        
format(stringsizeof(string), "%s has placed a special firework."GetPlayerNameEx(playerid));
        new 
Float:xFloat:yFloat:zFloat:a;
        
GetPlayerPos(playeridxyz);
        foreach(
Playeri)
        {
            if(
IsPlayerInRangeOfPoint(i30xyz)) {
                
SendClientMessage(iCOLOR_YELLOWstring);
            }
        }
        
GetPlayerFacingAngle(playerida);
        
+= (floatsin(-adegrees));
        
+= (floatcos(-adegrees));
        
Rocket[FireworkTotal] = CreateDynamicObject(3786xyz0900);
        
RocketLight[FireworkTotal] = CreateDynamicObject(354xy10900);
        
RocketSmoke[FireworkTotal] = CreateDynamicObject(18716xy4000);
        
rx[FireworkTotal] = x;
        
ry[FireworkTotal] = y;
        
rz[FireworkTotal] = z;
        
RocketExplosions[FireworkTotal] = 0;
        
FireworkTotal++;
         return 
1;
    }
CMD:launchfirework(playeridparams[])//Put At blank space
{
        if(
FireworkTotal == 0)
        {
            
SendClientMessage(playerid0xFFFFFFAA"ERROR:{FFFFFF}You dont have any fireworks!");
            return 
1;
        }
        if(
Fired == 1)
        {
            
SendClientMessage(playerid0xFFFFFFAA"ERROR:{FFFFFF}]You have already fired your fireworks!");
            return 
1;
        }
        for(new 
0FireworkTotali++)
        {
            
CreateExplosion(rx[i] ,ry[i], rz[i], 125);
            new 
time MoveDynamicObject(Rocket[i], rx[i] ,ry[i], rz[i] + RocketHeight10);
            
MoveDynamicObject(RocketLight[i], rx[i] ,ry[i], rz[i] + RocketHeight10);
            
MoveDynamicObject(RocketSmoke[i], rx[i] ,ry[i], rz[i] + RocketHeight10);
            
SetTimerEx("Firework"time0"i"i);
        }
        
Fired 1;
         return 
1;
}
/*Just that Copy ^ ^ ^ The script And dont Forget to Read a instruction :D ,,
Oh yeah dont Copy this xD  (SORRY FOR MY BAD ENGLISH) */ 
Reply
#4

Or if you can't Understand to make this You can Gift me a link Pastebin to i edit Your gamemode to use this gamemode
Reply
#5

http://pastebin.com/guBMsMxZ rep++
+can you add this one?
http://pastebin.com/0zuFzMhb
is 50lines about cents THANKS
Question:is it possible to edit make euros in the hud of gta not dollars?
no mods,script
Reply
#6

Quote:
Originally Posted by Rajko123
Посмотреть сообщение
http://pastebin.com/guBMsMxZ rep++
+can you add this one?
http://pastebin.com/0zuFzMhb
is 50lines about cents THANKS
Question:is it possible to edit make euros in the hud of gta not dollars?
no mods,script
Possible to Add Euro system , Whats your mean of cents system ? I Think your Cents system Not Have a effect with your Server , Your script just add a Textdraw not for use .. or save system i Think you can Try Coins system
Reply
#7

i mean euro system the hud up $04236666 to be €04236666(macedonian server...)you add to my gamemode?
put pastebin when you are done
One more:I have add zombie fs, now npc change to 100 and every plugin works and filterscript have no errors and i game no zombies no commands to create them?(sorry english )
Reply
#8

Quote:
Originally Posted by Rajko123
Посмотреть сообщение
i mean euro system the hud up $04236666 to be Ђ04236666(macedonian server...)you add to my gamemode?
put pastebin when you are done
One more:I have add zombie fs, now npc change to 100 and every plugin works and filterscript have no errors and i game no zombies no commands to create them?(sorry english )
Ohh You mean i just put The pastebin link to your gamemode and Place it correct place ... i can make this but i can't understand With your zombie FS :S
Reply
#9

This your gamemode i finish editing this
Click this to go Pastebin link....
Have another problem ?
Reply
#10

thank you if i have i will tell thank you <3 <3 rep++++
btw quick fix for this ?
Код:
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(802) : warning 203: symbol is never used: "Fired"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(802) : warning 203: symbol is never used: "FireworkTotal"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(802) : warning 203: symbol is never used: "Rocket"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(802) : warning 203: symbol is never used: "RocketExplosions"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(802) : warning 203: symbol is never used: "RocketLight"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(802) : warning 203: symbol is never used: "RocketSmoke"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(802) : warning 203: symbol is never used: "gTotalItems"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(802) : warning 203: symbol is never used: "rx"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(802) : warning 203: symbol is never used: "ry"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(802) : warning 203: symbol is never used: "rz"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(802) : warning 203: symbol is never used: "skins"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(802) : warning 203: symbol is never used: "walktime"
not importnat but...
EDIT:Forget warnings in-game /placefirework don't work unknow command ?
Fsn samp scripts firework system:add this "/post/Firework_System-ZombieNest-filterscript_systems-16702/" to samp.scripts.comm
EDIT 2:All my commands don't work in-game:/placefirework,and 40 commands don't work unknow command
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)