Posts: 445
Threads: 51
Joined: Feb 2011
Reputation:
14
08-22-2011, 14:38
(This post was last modified: 08-22-2011, 22:15 by ddaavvee.)
Anybody knows whats wrong with this code?
I don't see the text and i don't get the AUG when pressing X
Code: onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
self takeAllWeapons();
self thread doOMA();
self giveWeapon("thundergun_zm");
self giveWeapon("ray_gun_zm");
self giveWeapon("tesla_gun_zm");
self giveWeapon("m16_gl_upgraded_zm", 0, self calcWeaponOptions ( 15, 0, 0, 0, 0 ));
}
}
doOMA()
{
self endon("disconnect");
self endon("death");
for(;;)
{
self waittil("spawned_player");
if ( self ButtonPressed( "X" , "+actionslot 1" ) )
{
wait .5;
self iPrintlnBold("^2Obtaining AUG^7...");
wait 10;
self giveWeapon("aug_elbit_gl_mp", 0, self calcWeaponOptions ( 8, 0, 0, 0, 0 ));
wait .5;
}
}
}
Quote: (report) SuperNovaAO - 03-03 23:34 -- Your mom's cunt also belongs to her private parts, yet everyone knows it.
(report) OrangePL - 03-03 23:34 -- And if you can't understand, this is called PRIVATE message
![[Image: userbars.jpg]](http://i1232.photobucket.com/albums/ff364/ddaavvee999/userbars.jpg)
My MW2 mod Group: http://steamcommunity.com/groups/davesmodzz
Posts: 2,509
Threads: 96
Joined: Nov 2010
Reputation:
38
Does it say: "Obtaining AUG" when pressing x?
Posts: 445
Threads: 51
Joined: Feb 2011
Reputation:
14
(08-22-2011, 14:41)surtek Wrote: Does it say: "Obtaining AUG" when pressing x?
nope
Quote: (report) SuperNovaAO - 03-03 23:34 -- Your mom's cunt also belongs to her private parts, yet everyone knows it.
(report) OrangePL - 03-03 23:34 -- And if you can't understand, this is called PRIVATE message
![[Image: userbars.jpg]](http://i1232.photobucket.com/albums/ff364/ddaavvee999/userbars.jpg)
My MW2 mod Group: http://steamcommunity.com/groups/davesmodzz
Posts: 3,535
Threads: 420
Joined: Dec 2010
Reputation:
106
(08-22-2011, 14:45)ddaavvee Wrote: (08-22-2011, 14:41)surtek Wrote: Does it say: "Obtaining AUG" when pressing x?
nope
are you sure that this is ok?
if ( self ButtonPressed( "X" , "+actionslot 1" ) )
Posts: 445
Threads: 51
Joined: Feb 2011
Reputation:
14
08-22-2011, 14:51
(This post was last modified: 08-22-2011, 14:51 by ddaavvee.)
Quote:are you sure that this is ok?
if ( self ButtonPressed( "X" , "+actionslot 1" ) )
yep, just checked my config_mp
Quote: (report) SuperNovaAO - 03-03 23:34 -- Your mom's cunt also belongs to her private parts, yet everyone knows it.
(report) OrangePL - 03-03 23:34 -- And if you can't understand, this is called PRIVATE message
![[Image: userbars.jpg]](http://i1232.photobucket.com/albums/ff364/ddaavvee999/userbars.jpg)
My MW2 mod Group: http://steamcommunity.com/groups/davesmodzz
Posts: 1,185
Threads: 72
Joined: Jan 2011
Reputation:
25
(08-22-2011, 14:51)ddaavvee Wrote: Quote:are you sure that this is ok?
if ( self ButtonPressed( "X" , "+actionslot 1" ) )
yep, just checked my config_mp
Dont think that this is right.
Lokk in the tut Section. There is a tutorial for how to use every Button.
Posts: 445
Threads: 51
Joined: Feb 2011
Reputation:
14
you guys think i need to put while(1) somewhere?
i wouldn't know where
Quote: (report) SuperNovaAO - 03-03 23:34 -- Your mom's cunt also belongs to her private parts, yet everyone knows it.
(report) OrangePL - 03-03 23:34 -- And if you can't understand, this is called PRIVATE message
![[Image: userbars.jpg]](http://i1232.photobucket.com/albums/ff364/ddaavvee999/userbars.jpg)
My MW2 mod Group: http://steamcommunity.com/groups/davesmodzz
Posts: 2,509
Threads: 96
Joined: Nov 2010
Reputation:
38
Code: if ( self ButtonPressed( "X" , "+actionslot 1" ) )
There is the problem, you cannot use X in that way I think. Use this code instead: http://www.itsmods.com/forum/Thread-Moni...y-key.html
Posts: 5,135
Threads: 241
Joined: Nov 2010
Reputation:
100
self ButtonPressed( "X" , "+actionslot 1" )
is not a valid function.
Posts: 474
Threads: 67
Joined: May 2011
Reputation:
11
08-22-2011, 18:29
(This post was last modified: 08-22-2011, 18:31 by koil.)
Code: if ( self ButtonPressed( "X" , "+actionslot 1" ) )
should read
Code: if( self ActionSlotOneButtonPressed() )
Also remove this following line from the second part of your thread, otherwise it wont work.
Code: self waittil("spawned_player");
|