Jump to content
  • 0

Object Health


CosminZEQ

Question

5 answers to this question

Recommended Posts

  • 0
5 minutes ago, CosminZEQ said:

Ma poate ajuta cineva sa i dau viata la un obiect, de ex, o vaca, cand trag cu m4 in ea sa-i scada hp, va rog frumos.

Eu folosesc la un sistem de cadouri ceea ce imi scri tu aici, poate te ajuta asta.

if(hittype == BULLET_HIT_TYPE_OBJECT)
    { 
    	if(weaponid == 31 || weaponid == 24 || weaponid == 26 || weaponid == 25 || weaponid == 29 || weaponid == 30 || weaponid == 33 || weaponid == 25)
    	{
    		if(azisceva == 1) return 1;
            if(hitid == cadouzburator) 
            {
            	new dmg = 5;
                cadouviata -= dmg,cadoubani[playerid] += 5000,dmgdat[playerid] += dmg,cadoulabel();
                if(cadoutimeractiv[playerid] == 0) 
                {
	                if(cadoumesaj != 0) return 1;
	                cadoutimer[playerid] = SetTimerEx("updatecadoubar", 100, true, "%d", playerid);
	                cadoutimeractiv[playerid] = 1;
            	}
                if(cadouviata <= 0) 
                {
	                cadoumort = 1,cadoumsg = 0,cadoulbl = 0,cadoulevel = 0,azisceva = 1,cadoumesaj = 1;
	            	new Float:pos[3];
	            	GetObjectPos(cadouzburator, pos[0],pos[1],pos[2]);
	            	collectobject = CreateObject(1577,  pos[0],pos[1],pos[2], 0,0,0, 100.0);
	            	UpdateDynamic3DTextLabelText(Cadolabel, COLOR_WHITE, "Pentru a colecta premiul foloseste /collect!");
	                foreach(new i : Player) 
	                {
		            	if(dmgdat[i] > 500) cadourp[i] = 1 + random(10), cadoupp[i] = 1 + random(20);
		                if(dmgdat[i] > 0) 
		                {
			                SCM(i,COLOR_MONEY, "(AirDrop) Pentru a colecta premiul foloseste /collect!");
			                SCM(i,COLOR_MONEY, "(AirDrop) Daca nu vei lua premiul in 60 de secunde vei pierde premiul.");
			            }
		                PremiuCadou = SetTimer("cadousmks", 60*1000, false);
		                KillTimer(cadoutimer[i]);
		                PlayerTextDrawHide(i, cadouzburatorPTD[0]);
		                DestroyPlayerProgressBar(i, cadouBAR[i]);
		                DestroyObject(cadouzburator);
		                DestroyObject(flamazburator);
            		}
          	    }	 
        	}
   		} 
    }

 

Ai nevoie de ajutor in scripting si nu ai bani? Te pot ajuta cu mare drag. Dar asta nu inseamna sa iti lucrez un Sistem de joc complet, daca ai nevoie de ajutor ma poti contacta pe Discord.ezgif-2-3a38433e2465.gif.9283810e304f5e405309769455e5e14b.gif

Link to comment
Share on other sites

  • 0
1 minute ago, LucaAdv. said:

@razvanduciuc da si mie sistemu ;)❤️

Poate ca o sa ti-l dau :)

 

Ai nevoie de ajutor in scripting si nu ai bani? Te pot ajuta cu mare drag. Dar asta nu inseamna sa iti lucrez un Sistem de joc complet, daca ai nevoie de ajutor ma poti contacta pe Discord.ezgif-2-3a38433e2465.gif.9283810e304f5e405309769455e5e14b.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.