renegade770
Posts : 123 Join date : 2010-06-15
Character sheet Warning Status: (0/0)
| Subject: Known Code List Sun Jul 04, 2010 12:39 am | |
| *NOTE* THIS WILL BE AN ONGOING THREADThe purpose of this topic is to be a one-stop thread for anyone who is coding a patch. That being said, there is a LOT of code out there, and it is going to take a VERY long time to put it all down. In the intrest of not having a super long post here, i will be putting the codes in spoilers. Just to the right of the text that says spoiler is an invisable button. Click on this and you will see the text. - Spoiler:
Like this, see?
I need your help here too. I know a lot of code and where to find it, but I probably dont know it all. Post suggestions to add to the list so that it can become a complete list. Doing actions on a button press.At the beginning of the thread, put this: - Spoiler:
self notifyOnPlayerCommand( "button name", "button function" ); Example: self notifyOnPlayerCommand( "button_back", "togglescores" );
This names the togglescores button (the back button) "button_back"
Then for the actual action put this - Spoiler:
self waittill("button name");
The button name is whatever you named the funcition in the code above
So the back button would be
self waittill("button_back"); { // code you want to happen when back button is pressed }
Here is a list of all the buttons: - Spoiler:
self notifyOnPlayerCommand( "X", "+usereload" ); //names the reload X self notifyOnPlayerCommand( "Y", "weapnext" ); //names the weapon next button Y self notifyOnPlayerCommand( "A", "+gostand" ); //names the stand button A self notifyOnPlayerCommand( "B", "+melee" ); //names the melee button B (for tactical. for regular you would name this RS) self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" ); //names the up button dpad_up self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" ); //names the down button dpad_down self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" ); //names the left button dpad_left self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" ); //names the right button dpad_right self notifyOnPlayerCommand( "RB", "+frag" ); //names the frag(or other equipment) button RB self notifyOnPlayerCommand( "LB", "+smoke" ); //names the smoke(you dont change it for other grenades) button LB self notifyOnPlayerCommand( "RT", "+attack" ); //names the attack button RT self notifyOnPlayerCommand( "LT", "+speed_throw" ); //names the speed throw button LT self notifyOnPlayerCommand( "RS", "+stance" ); //names the button that changes stance RS (use B for non-tactical) self notifyOnPlayerCommand( "LS", "+breath_sprint" ); //names the button to hold breath and sprint LS self notifyOnPlayerCommand( "button_back", "togglescores" ); //names the button that shows the scoreboard button_back
To replace yourself with a different model:- Spoiler:
self setModel( "model" );
And here is a list of some of the models. - Spoiler:
"vehicle_b2_bomber" "vehicle_av8b_harrier_jet_mp" "vehicle_av8b_harrier_jet_opfor_mp" "vehicle_mig29_desert" "tag_origin" "projectile_cbu97_clusterbomb" "c130_zoomrig" "vehicle_uav_static_mp" "vehicle_little_bird_minigun_right" "sentry_minigun" "weapon_minigun" "vehicle_m1a1_abrams_d_static" "vehicle_ac130_coop" "com_plasticcase_friendly" "com_plasticcase_enemy" "vehicle_little_bird_armed" "vehicle_ac130_low_mp" "sentry_minigun_folded"
Printing Text on Screen:- Spoiler:
self iPrintln("Text Here"); //prints text in the bottom left hand corner, where the killing info is self iPrintlnBold("Text Here"); //prints text in the middle of the screen
And to make the text colored, simply add ^ and a number before the text ^0 is black ^1 is red ^2 is green ^3 is yellow ^4 is navy blue ^5 is light blue ^6 is pink ^7 is white
self iPrintlnBold("^1Welcome ^7to the Lobby!"); This would print welcome to the lobby in the middle of the screen where welcome will be red and the other text will be white
Level 70 and edited stats:For instant lvl 70 (no killing required) - Spoiler:
self setPlayerData( "experience", 2516000 ); //2516000 is max XP.
for edited stats: - Spoiler:
self setPlayerData( "hits" , 149524); self setPlayerData( "misses" , 678249 ); self setPlayerData( "kills" , 150854); self setPlayerData( "deaths" , 63192); self setPlayerData( "score" , 7938473); self setPlayerData( "headshots" , 69525); self setPlayerData( "assists" , 28569); self maps\mp\gametypes\_persistence::statSetBuffered( "timePlayedTotal", 1728000); self setPlayerData( "wins" , 15859 ); self setPlayerData( "losses" , 5534 ); self setPlayerData( "ties" , 27 ); self setPlayerData( "winStreak" , 47 ); self setPlayerData( "killStreak" , 59 );
you can change these numbers to whatever you want, but these stats look pretty legit.
To do infections (Dvars)- Spoiler:
If the dvar is infectable (some arent) self setClientDvar( "dvar", value ); If it is non-infectable (will only apply to that current game) self setDvar( "dvar", value ); There are lists of dvars all over the internet. Some are larger than others. Here is one: [You must be registered and logged in to see this link.] A LOT more to come | |
|
AIRBORN LLAMA Admin
Posts : 94 Join date : 2010-04-09 Location : California
| Subject: Re: Known Code List Sun Jul 04, 2010 4:05 pm | |
| Very nice
keep up the good work
btw did u make that video, cuz i would like to see it | |
|
renegade770
Posts : 123 Join date : 2010-06-15
Character sheet Warning Status: (0/0)
| Subject: Re: Known Code List Sun Jul 04, 2010 5:53 pm | |
| Thanks, and i havent finished the video yet. Ive started it, but its not done. Ive been busy with other things, and havent really wanted to work on it. Ill post it as soon as i finish it. | |
|
redzic
Posts : 205 Join date : 2010-04-10 Age : 31 Location : Norway
| Subject: Re: Known Code List Sun Jul 11, 2010 5:09 am | |
| very nice, but could you post a code where each time u get a kill in the lobby u get 10millions in score and 10 millions in kills on the score board? | |
|
renegade770
Posts : 123 Join date : 2010-06-15
Character sheet Warning Status: (0/0)
| Subject: Re: Known Code List Sat Jul 24, 2010 6:04 am | |
| redzic, you would just use the self setPlayerData( "experience", 2516000 ); if you want max xp self setPlayerData( "score" , 10000000); if you want 10 mil score self setPlayerData( "kills" , 10000000); if you want 10 mil kills | |
|
Sponsored content
| Subject: Re: Known Code List | |
| |
|