View Full Version : press f
Loveboy
7th January 2013, 23:30
hello guys
if i press f i will get a mp44.. i press but i dont get
here script
if(other useButtonPressed())
{
mp44_mp = "mp44_mp";
other takeWeapon(other getCurrentWeapon());
other giveWeapon(mp44_mp);
}
please help me
kung foo man
7th January 2013, 23:36
It looks correct so far, but can you post the whole code with trigger etc.
Also use
to format source code (+ tabs for indention).
Tally
8th January 2013, 07:09
hello guys
if i press f i will get a mp44.. i press but i dont get
here script
if(other useButtonPressed())
{
mp44_mp = "mp44_mp";
other takeWeapon(other getCurrentWeapon());
other giveWeapon(mp44_mp);
}
please help me
Unless "other" is specifically defined as the player entity, always use "self" as the player entity:
if( self useButtonPressed() )
{
self takeWeapon( self getCurrentWeapon() );
self giveWeapon( "mp44_mp" );
self setWeaponSlotWeapon( "primary", "mp44_mp" );
self giveMaxAmmo( "mp44_mp" );
self switchtoWeapon( "mp44_mp" );
}
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.