News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: Function's / Mission scripting tutorial  (Read 7827 times)

0 Members and 1 Guest are viewing this topic.

Offline Shrimp

  • Sr. Member
  • ***
  • Posts: 514
  • Gender: Male
  • your official b-b's chav. wag wan.
    • View Profile
Function's / Mission scripting tutorial
« on: April 08, 2016, 02:12:46 PM »
FUNCTIONS
MISSION SCRIPTING
BY SHRIMP :)


Welcome to my lovely tutorial, where I'll show you the all the function's that I know and what they do. There's around 1000 function's in Bully, which I obviously don't know all of them.
I'll also show a basic mission script, with a nice small description about what is occurring in the function's.

Function's/Commands:
AreaTransitionXYZ(AreaCode, X, Y, Z)
Teleport's the players along with allies/enemies to that position.


AddBlipForChar(Ped, 0, Blip, Visibility)
This add's a blip to a Ped you desire. Blips below. (Credit's would go to Deadpool and Unknown for the thread). http://www.bully-board.com/index.php?topic=22886.0

AddBlipForCar(Vehicle, Blip, Visibility) This is the same as above.

BlipAddXYZ(X, Y, Z, Blip) This create's a Blip, the list for blip icon's is provided below.
http://www.bully-board.com/index.php?topic=22886.0


BlipRemove(Blip) Delete's a blip.

CameraSetXYZ(X, Y, Z) This is cool for mission's, it set's a position for a camera.

CameraLookAtXYZ(X, Y, Z) This make's the camera look at a certain direction, like PedFaceXYZ.

ClockSet(Hour, Minute) Set the clock's time, e;g ClockSet(8, 00)

DisablePunishmentSystem(true/false) Disable or enable the Punishment system.

GameSetPedStat(Ped, Stat, NewValue) This change's the stat of a ped to something different, you want.

TextPrintString("Text.", 4, 1) This display's text, you need to put a Wait() under it. Inside the () of the wait, put a thousand digit number, 1000 is a second, 1500 is a second and half. Number 1 display's it at the top, and number two display's it at the bottom.

PedAttack(Ped, Ped, value) This make's a ped attack another ped. Values: 1 = If the Ped is being attacked by another ped, then the ped who got attacked will attack the ped who hit him. 2 = If the ped got hit by someone else, he will ignore it and still attack the Ped he's ment to. 3 = I don't know, I think there is a three, though. NOTE : I think 2 may be 3.

PedAttackPlayer(Ped) This is kinda better then PedAttack if you want the ped to attack the player. This makes a ped attack the player.

PedCreateXYZ(Ped, X, Y, Z) Create's a ped at the XYZ coord's.
Now, you do something like,
Russell = PedCreateXYZ(). This is useful and if am right, needed for stuff like GameSetPedStat, or AddBlipForChar(). List of ped ID's below.


PedSetHealth(Ped, healthNumber) Set the HP of a ped.

Code: [Select]
-------------------------------------------
|   ID   |    MODEL NAME    | Outfit Type |
|--------|--------------------------------|
|        |                  |             |
|0    | Jimmy           |   Normal    |
-------------------------------------------
|1    | Jimmy           | Default Ped |
-------------------------------------------
|2    | Zoe             |             |
-------------------------------------------
|3    | Beatrice        |             |
-------------------------------------------
|4    | Algernon        |             |
-------------------------------------------
|5    | Fatty           |             |
-------------------------------------------
|6    | Melvin          |             |
-------------------------------------------
|7    | Thad            |             |
-------------------------------------------
|8    | Bucky           |             |
-------------------------------------------
|9    | Cornelius       |             |
-------------------------------------------
|10   | Earnest         |             |
-------------------------------------------
|11   | Donald          |             |
-------------------------------------------
|12   | Damon           |             |
-------------------------------------------
|13   | Kirby           |             |
-------------------------------------------
|14   | Mandy           |             |
-------------------------------------------
|15   | Dan             |             |
-------------------------------------------
|16   | Luis            |             |
-------------------------------------------
|17   | Casey           |             |
-------------------------------------------
|18   | Bo              |             |
-------------------------------------------
|19   | Ted             |             |
-------------------------------------------
|20   | Juri            |             |
-------------------------------------------
|21   | Peanut          |             |
-------------------------------------------
|22   | Hal             |             |
-------------------------------------------
|23   | Johnny          |             |
-------------------------------------------
|24   | Lefty           |             |
-------------------------------------------
|25   | Lola            |             |
-------------------------------------------
|26   | Lucky           |             |
-------------------------------------------
|27   | Vance           |             |
-------------------------------------------
|28   | Ricky           |             |
-------------------------------------------
|29   | Norton          |             |
-------------------------------------------
|30   | Gord            |             |
-------------------------------------------
|31   | Tad             |             |
-------------------------------------------
|32   | Chad            |             |
-------------------------------------------
|33   | Bif             |             |
-------------------------------------------
|34   | Justin          |             |
-------------------------------------------
|35   | Bryce           |             |
-------------------------------------------
|36   | Bryce           |             |
-------------------------------------------
|37   | Darby           |             |
-------------------------------------------
|38   | Pinky           |             |
-------------------------------------------
|39   | Angie           |             |
-------------------------------------------
|40   | Parker          |             |
-------------------------------------------
|41   | Jerry           |             |
-------------------------------------------
|42   | Otto            |             |
-------------------------------------------
|43   | Leon            |             |
-------------------------------------------
|44   | Duncan          |             |
-------------------------------------------
|45   | Henry           |             |
-------------------------------------------
|46   | Gurney          |             |
-------------------------------------------
|47   | Omar            |             |
-------------------------------------------
|48   | Zoe             |             |
-------------------------------------------
|49   | Max             |             |
-------------------------------------------
|50   | Seth            |             |
-------------------------------------------
|51   | Edward          |             |
-------------------------------------------
|52   | Karl            |             |
-------------------------------------------
|53   | Theo            |             |
-------------------------------------------
|54   | MissPeabody     |             |
-------------------------------------------
|55   | MrBurton        |             |
-------------------------------------------
|56   | MrLuntz         |             |
-------------------------------------------
|57   | MrGalloway      |             |
-------------------------------------------
|58   | Edna            |             |
-------------------------------------------
|59   | MissWinston     |             |
-------------------------------------------
|60   | MrsMcRae        |             |
-------------------------------------------
|61   | MrHuntingdon    |             |
-------------------------------------------
|62   | MrsCarvin       |             |
-------------------------------------------
|63   | MsPhillips      |             |
-------------------------------------------
|64   | MrSlawter       |             |
-------------------------------------------
|65   | DrCrabblesnitch |             |
-------------------------------------------
|66   | Sheldon         |             |
-------------------------------------------
|67   | Christy         |             |
-------------------------------------------
|68   | Gloria          |             |
-------------------------------------------
|69   | Pedro           |             |
-------------------------------------------
|70   | Constantinos    |             |
-------------------------------------------
|71   | Ray             |             |
-------------------------------------------
|72   | Ivan            |             |
-------------------------------------------
|73   | Trevor          |             |
-------------------------------------------
|74   | Eunice          |             |
-------------------------------------------
|75   | Russell         |             |
-------------------------------------------
|76   | DrBambillo      |             |
-------------------------------------------
|77   | MrSullivan      |             |
-------------------------------------------
|78   | MsKopke         |             |
-------------------------------------------
|79   | MsRushinski     |             |
-------------------------------------------
|80   | MsIsaacs        |             |
-------------------------------------------
|81   | BethanyJones    |             |
-------------------------------------------
|82   | ORourke         |             |
-------------------------------------------
|83   | OfficerMonson   |             |
-------------------------------------------
|84   | ZackOwens       |             |
-------------------------------------------
|85   | Trent           |             |
-------------------------------------------
|86   | TobiasMason     |             |
-------------------------------------------
|87   | MrGrant         |             |
-------------------------------------------
|88   | Mascot          |             |
-------------------------------------------
|89   | MrOh            |             |
-------------------------------------------
|90   | Christy         |             |
-------------------------------------------
|91   | Edgar           |             |
-------------------------------------------
|92   | Luis            |    Wrestling |
-------------------------------------------
|93   | Mandy           |             |
-------------------------------------------
|94   | Pinky           |             |
-------------------------------------------
|95   | Beatrice        |             |
-------------------------------------------
|96   | Lola            |             |
-------------------------------------------
|97      | OfficerWilliams |             |
-------------------------------------------
|98      | Jimmy           |  Wrestling  |
-------------------------------------------
|99      | Davis           |             |
-------------------------------------------
|100  | MrBreckindale   |             |
-------------------------------------------
|101  | MrDoolin        |             |
-------------------------------------------
|102  | Troy            |             |
-------------------------------------------
|103  | Nate            |             |
-------------------------------------------
|104  | MrCarmichael    |             |
-------------------------------------------
|105  | NickyCharles    |             |
-------------------------------------------
|106  | MrWatts         |             |
-------------------------------------------
|107  | MissAbby        |             |
-------------------------------------------
|108  | Mihailovich     |             |
-------------------------------------------
|109  | Kirby           |        Football outfit     |
-------------------------------------------
|110  | Ted             |      Football outfit       |
-------------------------------------------
|111  | Dan             |      Football outfit       |
-------------------------------------------
|112  | Damon           |      Football outfit       |
-------------------------------------------
|113  | Freeley         |             |
-------------------------------------------
|114  | Dorsey          |             |
-------------------------------------------
|115  | Hector          |             |
-------------------------------------------
|116  | Osbourne        |             |
-------------------------------------------
|117  | Chad            |             |
-------------------------------------------
|118  | Justin          |             |
-------------------------------------------
|119  | Parker          |             |
-------------------------------------------
|120  | MariaTheresa    |             |
-------------------------------------------
|121  | Bob             |             |
-------------------------------------------
|122  | Fatty           |             |
-------------------------------------------
|123  | Chuck           |             |
-------------------------------------------
|124  | Ian             |             |
-------------------------------------------
|125  | Fenwick         |             |
-------------------------------------------
|126  | Neil            |             |
-------------------------------------------
|127  | MrSvenson       |             |
-------------------------------------------
|128  | Denny           |             |
-------------------------------------------
|129  | MrGalloway      |             |
-------------------------------------------
|130  | Gary            |             |
-------------------------------------------
|131  | Krakauer        |             |
-------------------------------------------
|132  | MrMoratti       |             |
-------------------------------------------
|133  | Bif             |             |
-------------------------------------------
|134  | Peter           |             |
-------------------------------------------
|135  | MrSmith         |             |
-------------------------------------------
|136  | Rat             |             |
-------------------------------------------
|137  | Melody          |             |
-------------------------------------------
|138  | Karen           |             |
-------------------------------------------
|139  | Gordon          |             |
-------------------------------------------
|140  | Brandy          |             |
-------------------------------------------
|141  | Pitbull         |             |
-------------------------------------------
|142  | Lance           |             |
-------------------------------------------
|143  | Crystal         |             |
-------------------------------------------
|144  | MrMartin        |             |
-------------------------------------------
|145  | Ethan           |             |
-------------------------------------------
|146  | Wade            |             |
-------------------------------------------
|147  | Tom             |             |
-------------------------------------------
|148  | MrRamirez       |             |
-------------------------------------------
|149  | MrHuntingdon    |             |
-------------------------------------------
|150  | Otto            |             |
-------------------------------------------
|151  | MrWiggins       |             |
-------------------------------------------
|152  | Floyd           |             |
-------------------------------------------
|153  | Leon            |             |
-------------------------------------------
|154  | Henry           |             |
-------------------------------------------
|155  | Fatty           |             |
-------------------------------------------
|156  | Stan            |             |
-------------------------------------------
|157  | Handy           |             |
-------------------------------------------
|158  | Gregory         |             |
-------------------------------------------
|159  | Pedro           |             |
-------------------------------------------
|160  | Gary            |             |
-------------------------------------------
|161  | Lucky           |             |
-------------------------------------------
|162  | Donald          |             |
-------------------------------------------
|163  | Parker          |             |
-------------------------------------------
|164  | Casey           |             |
-------------------------------------------
|165  | Peter           |             |
-------------------------------------------
|166  | Angie           |             |
-------------------------------------------
|167  | Pinky           |             |
-------------------------------------------
|168  | Damon           |             |
-------------------------------------------
|169  | Gordon          |             |
-------------------------------------------
|170  | Ivan            |             |
-------------------------------------------
|171  | Trevor          |             |
-------------------------------------------
|172  | Bif             |             |
-------------------------------------------
|173  | Vance           |             |
-------------------------------------------
|174  | Thad            |             |
-------------------------------------------
|175  | Pinky           |             |
-------------------------------------------
|176  | Russell         |             |
-------------------------------------------
|177  | Tad             |       Cut model      |
-------------------------------------------
|178  | Bryce           |     Cut model        |
-------------------------------------------
|179  | Justin          |      Cut model       |
-------------------------------------------
|180  | Angie           |             |
-------------------------------------------
|181  | Christy         |             |
-------------------------------------------
|182  | Pinky           |             |
-------------------------------------------
|183  | MrBuba          |             |
-------------------------------------------
|184  | MrGordon        |             |
-------------------------------------------
|185  | MrsLisburn      |             |
-------------------------------------------
|186  | Fatty           |             |
-------------------------------------------
|187  | Betty           |             |
-------------------------------------------
|188  | Lightning       |             |
-------------------------------------------
|189  | Zeke            |             |
-------------------------------------------
|190  | Alfred          |             |
-------------------------------------------
|191  | Paris           |             |
-------------------------------------------
|192  | Courtney        |             |
-------------------------------------------
|193  | Delilah         |             |
-------------------------------------------
|194  | Drew            |             |
-------------------------------------------
|195  | Castillo        |             |
-------------------------------------------
|196  | Edgar           |     Gym        |
-------------------------------------------
|197  | Gurney          |       Gym      |
-------------------------------------------
|198  | Jerry           |     Gym        |
-------------------------------------------
|199  | Leon            |      Gym       |
-------------------------------------------
|200  | Hal             |       Gym      |
-------------------------------------------
|201  | Norton          |       Gym      |
-------------------------------------------
|202  | Peanut          |      Gym       |
-------------------------------------------
|203  | Vance           |      Gym      |
-------------------------------------------
|204  | Bo              |      Gym       |
-------------------------------------------
|205  | Damon           |       Gym      |
-------------------------------------------
|206  | Juri            |      Gym       |
-------------------------------------------
|207  | Kirby           |       Gym      |
-------------------------------------------
|208  | Algernon        |      Gym       |
-------------------------------------------
|209  | Bucky           |      Gym       |
-------------------------------------------
|210  | Thad            |       Gym      |
-------------------------------------------
|211  | Parker          |      Gym       |
-------------------------------------------
|212  | Justin          |       Gym      |
-------------------------------------------
|213  | Tad             |      Gym       |
-------------------------------------------
|214  | Gord            |       Gym      |
-------------------------------------------
|215  | Earnest         |      End-Game model       |
-------------------------------------------
|216  | Ted             |       End-Game model      |
-------------------------------------------
|217  | Johnny          |      End-Game model       |
-------------------------------------------
|218  | Darby           |       End-Game model      |
-------------------------------------------
|219  | Pitbull         |             |
-------------------------------------------
|220  | Pitbull         |             |
-------------------------------------------
|221  | Edna            |             |
-------------------------------------------
|222  | McInnis         |             |
-------------------------------------------
|223  | Johnson         |             |
-------------------------------------------
|224  | Thad            |             |
-------------------------------------------
|225  | Sheldon         |             |
-------------------------------------------
|226  | Pedro           |             |
-------------------------------------------
|227  | Ivan            |             |
-------------------------------------------
|228  | Trevor          |             |
-------------------------------------------
|229  | MrBurton        |             |
-------------------------------------------
|230  | Mandy           |     Towel        |
-------------------------------------------
|231  | Bo              |     Football Outfit        |
-------------------------------------------
|232  | Casey           |      Football Outfit       |
-------------------------------------------
|233  | PunchBag        |             |
-------------------------------------------
|234  | OfficerMonson   |             |
-------------------------------------------
|235  | Constantinos    |             |
-------------------------------------------
|236  | McInnis         |             |
-------------------------------------------
|237  | McInnis         |             |
-------------------------------------------
|238  | OfficerWilliams |             |
-------------------------------------------
|239  | Bryce           |   Boxing    |
-------------------------------------------
|240  | Bryce           |   Boxing    |
-------------------------------------------
|241  | Chad            |   Boxing    |
-------------------------------------------
|242  | Chad            |   Boxing    |
-------------------------------------------
|243  | Bif             |   Boxing    |
-------------------------------------------
|244  | Justin          |   Boxing    |
-------------------------------------------
|245  | Justin          |   Boxing    |
-------------------------------------------
|246  | Parker          |   Boxing    |
-------------------------------------------
|247  | Parker          |   Boxing    |
-------------------------------------------
|248  | Geography Teacher|            |
-------------------------------------------
|249  |    Music Teacher |             |
-------------------------------------------
|250  | X-Mas Elf #1    |             |
-------------------------------------------
|251  |    X-Mas Elf #2  |             |
-------------------------------------------
|252  |    Hobo Santa    |             |
-------------------------------------------
|253  |    Fake Santa    |             |
-------------------------------------------
|254  |    Fake Santa    | Unknown     |
-------------------------------------------
|255  | Peter           |  NutCracker |
-------------------------------------------
|256  | Eunice          |  Halloween  |
-------------------------------------------
|257  | Melody          |  Halloween  |
-------------------------------------------
|258  | Pedro           |  Halloween  |

PedDelete(Ped) Simply delete's a ped.

PedDismissAllAllies(Ped) Dismiss allies of a ped or gPlayer.

PedGetUniqueModelStatus(PedIndex, status) Status are = -1, never spawns, 1, Model can be seen with one copy, 2, the model has duplicate copies.

PedHasAllyFollower(Ped) True or false, if, the ped has a follower (ally).

PedHasAllyLeader(Ped) Same as above, but instead if the Ally has a leader.

PedMoveToXYZ(Ped, Speed, X, Y, Z) Move's a ped to a certain place you want. Speed: 0 = walk, 1 = Jog, 2 = Sprint.

PedOverrideStat(Ped, Stat, NewValue) Override a stat of a ped with a value you like.

PedRecruitAlly(Ped, Ped) Only a ped can have one follower, but the follower can also have a follower, so it will chain. e;g
PedRecruitAlly(gPlayer, Gary) PedRecruitAlly(Gary, Pete)

PedSetMissionCritical(Ped, true, ???, false) I don't know much, as I can tell by the name it make's a Ped Critical, and if dead, the mission simply fail's. I don't know what true and false do, I only have knowledge of Ped, I recently just found this in a decompiled script of Halloween. (It seem's like there was a function in the middle, what the hell?)

PedSetEmotionTowardsPed(Ped, Ped, Emotion) Set's a ped's emotion to the second. List below.

Code: [Select]
  -------------------------
  |0       |   AGGRESSIVE |
  -------------------------
  |1       |      ANNOYED |
  -------------------------
  |2       |   UNFRIENDLY |
  -------------------------
  |3       |   DISMISSIVE |
  -------------------------
  |4       |  VERY SCARED |
  -------------------------
  |5       |       SCARED |
  -------------------------
  |6       |  INTIMIDATED |
  -------------------------

PedWander(Ped)

PedSetInfiniteSprint(Ped, True/False) If a ped can sprint forever. This is also used if gPlayer switched model's.

PedSetPedToTypeAttitude(Ped, Faction, Attitude) Set ped's attitude toward's another faction. Don't mix this with PedSetTypeToTypeAttitude.

PedSetPosXYZ(Ped, X, Y, Z) Set the position of a ped.

PedSetTypeToTypeAttitude(Faction, Faction, Attitude) Set the first faction attitude toward's another faction. List below.
Code: [Select]
Faction/Clique        ID
_____________
Prefect | 0

--------------------
Nerd         |       1
______________
Jock         |       2
______________
DropOut/Townies     |        3
______________
Greaser      |       4
______________
Preppy       |       5
______________
Student      |       6
______________
Cop            |     7
______________
Teacher       |      8
______________
TownPerson    |      9
______________
ShopKeep      |     10
______________
Bully        |      11
______________
Player2    |        14
______________
Player      |       13
______________   

Code: [Select]
RelationshipID's

Relationship | ID
-----------------------------
Abhor(Hate)      |        0
_____________________
Averse           |        1
____________________
Dispassionate(Ignores) |  2
____________________
Dig             |         3
____________________
Adore(Is your friend) |   4
____________________

PedSetWeapon(Ped, Weapon, Ammo) Give the ped a weapon with the ammo you desire. (NOTE, DON'T INPUT ANYTHING FOR AMMO IF YOU USE MELEE WEAPON'S, SIMPLY JUST DO PED AND WEAPON.)

PlayerSetControl(Control) This disables or enable's the players control. Controls: 0 = Disabled. 1 = Enabled.

PedIsInCombat(Ped) Basically can be used like a "if PedIsInCombat()" ect, mean's if the ped is In combat. (Credit's to UltimateGamer9)

SoundPlayStream(".rsm", 0.69999998807907) This play's a Soundtrack/music. Inside the " " Put the audio track, I'll provide a list below. Make sure you put .rsm after it. The number's are the sound, higher then 3 would be really loud. There are some testing one's that may have bad quality, they sound like the Bullies. I find them very cool, though.


Code: [Select]
Arc_FlyingSquirrelGameMx01
Arc_FlyingSquirrelGameMx02
Arc_FlyingSquirrelGameMx03
Arc_MonkeyFlingGame01
Arc_MonkeyFlingGame02
Arc_MonkeyFlingGame03
Arc_SUMO_Game01
ArcRaceMXmidi02Drive01
ArcRaceMXmidi02Drive02
ArcRaceMXmidi02Drive03
MS_6B_EndlessSummerCreditsNIS
MS_ActionHigh
MS_ActionHigh_NISReturn
MS_ActionLow
MS_ActionMid
MS_ArtClass
MS_BikeActionHigh
MS_BikeActionMid
MS_BikeChaseHigh
MS_BikeChaseLow
MS_BikeChaseMid
MS_BikeDay
MS_BikeFastHigh
MS_BikeFastLow
MS_BikeFunHigh
MS_BikeFastMid
MS_BikeFunLow
MS_BikeFunMid
MS_BikePractice
MS_BikeRace01
MS_BikeRace02
MS_BiologyClass
MS_BoxingBossFight
MS_BoxingReg
MS_Candidate
MS_Carnival01
MS_Carnival02
MS_CarnivalFunhouseAmbient
MS_CarnivalFunhouseMaze
MS_CarnivalFunhouseMiner
MS_ChasePrefect
MS_ChaseHigh
MS_ChaseLow
MS_ChaseMid
MS_ChasePolice
MS_ChemistryClass
MS_DestructionVandalismHigh
MS_DestructionVandalismMid
MS_DishonorableFight
MS_EnglishClass
MS_EpicConfrantation_NIS
MS_EpicConfrontationHigh
MS_EpicConfrontationHighPart2
MS_EpicConfrontationLow
MS_EpicConfrontationMid
MS_FearTensionMid
MS_FightingBullies
MS_FightingDropouts
MS_FightingGeneric
MS_FightingGreasers
MS_FightingJocks
MS_FightingJohnnyVincentBikeRide
MS_FightingJohnnyVincentBossFight
MS_FightingJohnnyVincentFight
MS_FightingNerds
MS_FightingPreps
MS_FightingPrepsLow
MS_FinalShowdown03High
MS_FinalShowdown03Low
MS_FinalShowdown03Mid
MS_FinalShowdownHigh
MS_FinalShowdownLow
MS_FinalShowdownMid
MS_FootStealthHigh
MS_FootStealthLow
MS_FootStealthMid
MS_FriendshipAllyHigh
MS_FriendshipAllyLow
MS_FriendshipAllyMid
MS_FunHigh
MS_FunLow
MS_FunMid
MS_GeographyClass
MS_Gobble
MS_GoKart 01
MS_GoKart02
MS_GoKarts02
MS_GymClass
MS_HalloweenHigh
MS_HalloweenLow
MS_HalloweenMid
MS_InTroubleHigh
MS_InTroubleLow
MS_JockBossBattle
MS_KidsPlay
MS_LockPicking
MS_MathClass
MS_MisbehavingHigh
MS_MisbehavingHigh_NIS01
MS_MisbehavingHigh_NIS02
MS_MisbehavingHigh_NIS03
MS_MisbehavingLow
MS_MisbehavingMid
MS_MovieTixRomance
MS_MusicClass_Carols01
MS_MusicClass_Coming
MS_MusicClass_Liberty
MS_MusicClass_MasterP
MS_MusicClass_Turkey
MS_MusicClass_Washing
MS_PhotographyClass
MS_RomanceHigh
MS_RomanceLow
MS_RomanceMid
MS_RunningFight-2 MIX TR
MS_RunningHigh
MS_RunningLow
MS_RunningLow02
MS_RunningMid
MS_RussellInTheHole
MS_SearchingHigh
MS_SearchingLow
MS_SearchingMid
MS_ShopClass
MS_ShowdownAtThePlantHigh
MS_ShowdownAtThePlantLow
MS_SneakDate_Romantic
MS_SneakDate_SexyGirl
MS_Somower
MS_StealthHigh
MS_StealthLow
MS_StealthMid
MS_StealthMidA
MS_StreetFightLargeHigh_Boxing
MS_StreetFightLargeLow_Boxing
MS_StreetFightLargeMid_Boxing
MS_TenementsHigh
MS_TenementsLow
MS_TenementsMid
MS_TensionBuilder01
MS_Tired
MS_WIldstyleHigh
MS_WIldstyleLow
MS_WIldstyleMid
MS_XmasBellsRudyHigh
MS_XmasBellsRudylow
MS_XmasBellsRudyMid
MS_XmasComeRudyHigh
MS_XmasComeRudyLow
MS_XmasComeRudyMid
MS_XmasFavoriteBallsHigh
MS_XmasFavoriteBallsLow
MS_XmasFavoriteBallsMed
MS_XmasJingleMiracle
MS_XmasJingleMiracleHigh
MS_XmasJingleMiracleLow
MS_XmasJingleMiracleMid
MS_FIGHT01A
MS_FIGHT01B
MS_FIGHT01C
MS_FIGHT01D
MS_FIGHT01EEndFade
MS_FIGHT01EndFade
MS_FIGHT01F
MS_FightLow03
MS_FightMid01
MS_FightMid02
MS_FightMid03

MISSION ONES BELOW!!!
MS_3-B_ENDTAG
MS_3B_JohhnyV_NIS
MS_5-05_BurtonPee_NIS
MS_5-05_MeetZoe_NIS
MS_6B_EndlessSummerCreditsNIS
MS_1-06_HoboNIS
MS_5-05_NIS_PottyFall
MS_5-06_Garage_NIS
MS_5-06_HarleyLeavesExplode_NIS


SoundPlayAmbientSpeechEvent(Ped, Speech) Play's ambient speech on ped.

SoundPlayScriptedSpeechEvent(Ped, "Speech event", 0, "large") I don't know what large and 0 does. This plays a Scripted speech event on a Ped. Thread below of some speech event's. (Credit's to Reath)
http://www.bully-board.com/index.php?topic=20827.0

SoundStopCurrentSpeechEvent(Ped) Make's the ped shutup.

VehicleCreateXYZ(VehicleIndex, X, Y, Z) Create a vehicle. Vehicle's below. Treat this PedCreateXYZ, Name = VehicleCreateXYZ()
Code: [Select]
---------------------------
| Id  | MODEL NAME | TYPE |
---------------------------
|                         |
---------------------------
| 272 | bmxrace    | bike |
---------------------------
| 273 | retro    | bike |
---------------------------
| 274 | crapbmx    | bike |
---------------------------
| 275 | bikecop    | bike |
---------------------------
| 276 | Scooter    | bike |
---------------------------
| 277 | bike    | bike |
---------------------------
| 278 | custombike | bike |
---------------------------
| 279 | banbike    | bike |
---------------------------
| 280 | mtnbike    | bike |
---------------------------
| 281 | oladbike   | bike |
---------------------------
| 282 | racer    | bike |
---------------------------
| 283 | aquabike   | bike |
---------------------------
| 284 | Mower    | car  |
---------------------------
| 285 | Arc_3    | car  |
---------------------------
| 286 | taxicab    | car  |
---------------------------
| 287 | Arc_2    | car  |
---------------------------
| 288 | Dozer    | car  |
---------------------------
| 289 | GoCart    | car  |
---------------------------
| 290 | Limo    | car  |
---------------------------
| 291 | Dlvtruck   | car  |
---------------------------
| 292 | Foreign    | car  |
---------------------------
| 293 | cargreen   | car  |
---------------------------
| 294 | 70wagon    | car  |
---------------------------
| 295 | policecar  | car  |
---------------------------
| 296 | domestic   | car  |
---------------------------
| 297 | Truck    | car  |
---------------------------
| 298 | Arc_1    | car  |
---------------------------

VehicleDelete(Vehicle) Delete's vehicle.

VehicleSetPosXYZ(Vehicle, X, Y, Z) Direction where the vehicle would face.


MISSION SCRIPTING / TUTORIAL

So far this is all I got for function's, I will add more if I find more!
I will also start working on the mission tutorial in a few day's or in a week.
Thank's for reading!
« Last Edit: April 09, 2016, 11:56:29 PM by Shrimp »

Offline UltimateGamer9

  • Full Member
  • ***
  • Posts: 190
  • Gender: Male
    • View Profile
Re: Function's / Mission scripting tutorial
« Reply #1 on: April 08, 2016, 11:07:39 PM »
i got a code for u :- PedIsInCombat(Ped) the code is when the ped is in a battle. this can also be used for missions, trust me

Offline Shrimp

  • Sr. Member
  • ***
  • Posts: 514
  • Gender: Male
  • your official b-b's chav. wag wan.
    • View Profile
Re: Function's / Mission scripting tutorial
« Reply #2 on: April 08, 2016, 11:30:30 PM »
i got a code for u :- PedIsInCombat(Ped) the code is when the ped is in a battle. this can also be used for missions, trust me
Oooh, I forgot about that actually lol, I used it a once or twice.
Thank's, adding it now ^^

Offline UltimateGamer9

  • Full Member
  • ***
  • Posts: 190
  • Gender: Male
    • View Profile
Re: Function's / Mission scripting tutorial
« Reply #3 on: April 09, 2016, 12:38:06 AM »
And of course, mission timer, which is frequently used in some missions. MissionTimerStart(timerspeed) which basically starts the timer. MissionTimerHasFinished() which of course, when the timer has finished. Optional codes:- MissionTimerPause() I never tried this before but I'm sure it is to pause the timer. MissionTimerStop() which is to stop the timer? I'm not sure what is the difference of MissionTimerPause and MissionTimerStop.

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Function's / Mission scripting tutorial
« Reply #4 on: April 09, 2016, 03:17:56 PM »
I'm impressed you put this much time into making a helpful topic like this Shrimp, nice work. It doesn't cover any real technical aspects of scripting but I guess people want simplicity like that. Regardless it still seems to be a really nice function reference topic.

I noticed you're missing just a few IDs, such as the prefect faction which is 0. Here if you need a bigger list: http://pastebin.com/raw/1mPt9geB

You might find some more to add from here if you're looking to make a full function reference guide too.