Syntax for giveweapon ?

Posts 1–7 of 7 · Page 1 of 1
Syntax for giveweapon ?
I used this code on isnipe mod, where i wanted to give barrett , but it shud change back to intervention after the ammo is finished in barrett which i have given as 5 here ..
And the same button cant be pressed again to get another barrett

whats wrong in this syntax ?

it gives script compile error !!

please help

Code:
Barrett() 
{ 
   self endon("disconnect"); 
   self endon("death"); 
    
   self notifyOnPlayerCommand("B", "+actionslot 3");
    while(1) 
    {
		self waittill( "B" );

			self takeWeapon("cheytac_fmj_xmags_mp");
			self giveWeapon( "barrett_fmj_silencer_mp", 8, false );
			self switchToWeapon( "barrett_fmj_silencer_mp");
			self setWeaponAmmoClip( "barrett_fmj_silencer_mp", 5 );
			self iPrintlnBold("Barrett ON");
			if ( self getweaponammostock( "barrett_fmj_silencer_mp") = 0 ) ;
			self takeWeapon( "barrett_fmj_silencer_mp");
			self giveWeapon( "cheytac_fmj_xmags_mp", 8, false );
			self switchToWeapon( "cheytac_fmj_xmags_mp");
			self GiveMaxAmmo( "cheytac_fmj_xmags_mp");
			wait 0.5;
   }
}
Quote Originally Posted by slash.sniper View Post
it gives script compile error !!
And therefore should say which line provides the error. Could you tell us ?
Quote Originally Posted by Horror View Post

And therefore should say which line provides the error. Could you tell us ?
It doesnt tell which line has error , it just gives an error script compile error , i m using iw4play client to check mod
Quote Originally Posted by slash.sniper View Post
It doesnt tell which line has error , it just gives an error script compile error , i m using iw4play client to check mod
I've used similar clients (repz) and they always gave me the line
Quote Originally Posted by Horror View Post

I've used similar clients (repz) and they always gave me the line
Ok let me download repz then I ll post back
hi, i just checked mod in repz also , i could not get any line error, can u tell what can be the code for a replacement of primary with another primary weapon such that it changes back to 1st primary when ammo in 2nd primary finishes ??
I'm not that experienced with mods, sorry ...
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us