Zone Help
#1

Hello Guys,

Im trying to do something about anthrax in capture zone! But now i wanna make this when someone launch anthrax! Anthrax will explode in this zone,but i want small explode size but idk what to do! eandom explosions

Код:
if(dialogid == 666)
{
        {
        if(response)
        {
	        switch(listitem)
            {
	            case 0:
	            {
	            if(GetPlayerMoney(playerid) >= 400000)
			    {
			    if(GetPlayerScore(playerid) >= 2000)
			    {
			    GivePlayerMoney(playerid, -400000);
			    SendClientMessageToAll(red,"Airstrike has been launched in Snake Farm zone.");
				anthrax_time = 30;
                foreach(Player, i)
				{
                    {
                    if(IsPlayerInArea(i,-62.5000000000005,2318.359375,23.4375,2390.625))
				    {
				    if(gTeam[i]!= gTeam[playerid])
				    {
	            		new Float:hp[MAX_PLAYERS];
					    GetPlayerHealth(i, hp[i]);
					    SetPlayerHealth(i, hp[i]-75);
						GameTextForPlayer(i, "~g~YOU ARE INFECTED DIE IDIOT", 4000, 3);
						if(hp[i] <= 0)
						{
							SendDeathMessage(playerid,i,51);
							PlayerInfo[i][Deaths] ++;
	                        PlayerInfo[playerid][Kills] ++;
							GivePlayerMoney(playerid, 250);
							new String[100];
							GivePlayerScore(playerid, 1);
							format(String,sizeof(String),"Airstrike killed %s +1 Score Earned +250$", GetName(i));
							SendClientMessage(playerid, green, String);
						}
					}else return false;
				}
				}else SendClientMessage(playerid, RED, "ERROR: You need rank 7 to launch Airstrike!");
			}else SendClientMessage(playerid, red, "ERROR: You Need 400000$ cash to launch Airstrike!");
		}
	}
Код:
new ran = random(5);
if(ran == 3)
{
CreateExplosion(q,w,e,7,50.0);
}
if(ran == 2)
{
CreateExplosion(q,w+10.0,e,7,50.0);
}
if(ran == 1)
{
CreateExplosion(q,w+15.0,e,7,50.0);
}
if(ran == 4)
{
CreateExplosion(q+20,w+20.0,e,7,50.0);
}
}
HOW do i insert this on this code! ? i dont wanna explosion like nuke i wanna small one random explosions
Reply
#2

Bump please!
Reply
#3

....
Reply
#4

PHP код:
if(dialogid == 666)
{
    if(
response)
    {
        switch(
listitem)
        {
            case 
0:
            {
                if(
GetPlayerMoney(playerid) >= 400000)
                {
                    if(
GetPlayerScore(playerid) >= 2000)
                    {
                        
GivePlayerMoney(playerid, -400000);
                        
SendClientMessageToAll(red,"Airstrike has been launched in Snake Farm zone.");
                        
anthrax_time 30;
                        new 
ran random(5);
                        if(
ran == 3){CreateExplosion(q,w,e,7,50.0);}
                        if(
ran == 2){CreateExplosion(q,w+10.0,e,7,50.0);}
                        if(
ran == 1){CreateExplosion(q,w+15.0,e,7,50.0);}
                        if(
ran == 4){CreateExplosion(q+20,w+20.0,e,7,50.0);}
                        foreach(
Playeri)
                        {
                            if(
IsPlayerInArea(i,-62.5000000000005,2318.359375,23.4375,2390.625))
                            {
                                if(
gTeam[i]!= gTeam[playerid])
                                {
                                    new 
Float:hp[MAX_PLAYERS];
                                    
GetPlayerHealth(ihp[i]);
                                    
SetPlayerHealth(ihp[i]-75);
                                    
GameTextForPlayer(i"~g~YOU ARE INFECTED DIE IDIOT"40003);
                                    if(
hp[i] <= 0)
                                    {
                                        
SendDeathMessage(playerid,i,51);
                                        
PlayerInfo[i][Deaths] ++;
                                        
PlayerInfo[playerid][Kills] ++;
                                        
GivePlayerMoney(playerid250);
                                        new 
String[100];
                                        
GivePlayerScore(playerid1);
                                        
format(String,sizeof(String),"Airstrike killed %s +1 Score Earned +250$"GetName(i));
                                        
SendClientMessage(playeridgreenString);
                                    }
                                }else return 
false;
                            }
                        }else 
SendClientMessage(playeridRED"ERROR: You need rank 7 to launch Airstrike!");
                    }else 
SendClientMessage(playeridred"ERROR: You Need 400000$ cash to launch Airstrike!");
                }
            }
        }
    }

Is this what you want?
Reply
#5

Its fine now but explosions not happened in this zone!
Reply
#6

Then update the positions for the explosions
Reply
#7

Quote:
Originally Posted by GangstaSunny
Посмотреть сообщение
Then update the positions for the explosions
How i can do that explain to me please! from where to take postions?
Reply
#8

Go trough the Area an use /save ingame to save some coordinates where the explosions should be. Then update the positions of CreateExplosion()
Reply
#9

I create this pos -43.8195,2336.0842,24.1406,287.1160,0,0,0,0,0,0

but how to insert this into like this

CreateExplosion(q,w,e,7,50.0)
Reply
#10

PHP код:
CreateExplosion(-43.8195 ,2336.084224.1406750.0); 
Are you kidding me?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)