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


Author Topic: Infinite Loading Screen  (Read 3743 times)

0 Members and 1 Guest are viewing this topic.

Offline 3gtheepic

  • Jr. Member
  • **
  • Posts: 10
  • Gender: Male
  • I'm just some kid who likes to mod.
    • View Profile
Infinite Loading Screen
« on: April 02, 2019, 11:47:54 PM »
Every time I go to the arcade race machine it loads infinitely. I also borrowed a lot of code from DaBoss. Can anybody help me?
 Here is the Code:

Code: [Select]
function MissionSetup()
PlayerSetPosXYZArea(14,-498,319,31)
PlayerSetHealth(PedGetMaxHealth(gPlayer))
LoadAllAnim()
end

function MissionCleanup()
TextPrintString('',1,1)
TextPrintString('',1,2)
PlayerSetControl(1)
CameraReturnToPlayer()
CameraSetWidescreen(false)
SoundStopStream()
DisablePunishmentSystem(false)
end


function main()
TestMissionPartOne()
end

function PedsPrepareConversation(ped1, ped2, distance, walkSpeed)
PlayerSetPunishmentPoints(0)
if PedGetWeapon(gPlayer) == 437 then
PedSetWeapon(gPlayer, -1)
end
if PedIsInAnyVehicle(gPlayer) then
PedWarpOutOfCar(gPlayer)
end
PedStop(ped2)
local x,y,z = PedGetPosXYZ(ped2)
PedMoveToXYZ(ped1, walkSpeed, x, y, z)
local r1 = x + distance
    local r2 = y + distance
    local r3 = x - distance
    local r4 = y - distance
x, y, z = PedGetPosXYZ(ped1)
PedFaceXYZ(ped2, x, y, z)
repeat
Wait(0)
until PedInRectangle(ped1,r1,r2,r3,r4)
PedStop(ped1)
x,y,z = PedGetPosXYZ(ped2)
PedFaceXYZ(ped1,x,y,z)
    x,y,z = PedGetPosXYZ(ped1)
    PedFaceXYZ(ped2,x,y,z)

end


function TestMissionPartOne()
CameraFade(500,1)
pete = PedCreate(14,-494,320,31)
PedSetStationary(pete, true)
PedSetInvulnurable(pete, true)
PlayerSetControl(0)
CameraSetXYZ(-493,317,31)
CameraLookAtXYZ(-495,314,31.5)
CameraSetWidescreen(true)
PedsPrepareConversation(gPlayer, pete, 1, 0)
TextPrintString("Peter: YO, bitch. It's your boy, blueface. Bust down thotiana. Jk. It's Pete.", 10, 2)
Wait(2000)
TextPrintString("Jimmy: What the fuck? Fuck you.", 10, 2)
Wait(2000)
TextPrintString("Pete: FUCK YOU TOO! DIE BITCH!", 10, 2)
AddBlipForChar(pete, 0, 26, 2)
PedSetStationary(pete,false)
PedSetInvulnurable(pete, false)
PlayerSetControl(1)
    CameraReturnToPlayer()
    CameraSetWidescreen(false)
SoundPlayStream("MS_BikeChaseHigh.rsm", 0.69999998807907)
PedAttackPlayer(pete)
repeat
Wait(0)
until PedIsDead(pete)
MissionSucceed()


end




Offline Altamurenza

  • Full Member
  • ***
  • Posts: 118
  • Gender: Male
  • I love cheat, unique, realistic, & expansion mod.
    • View Profile
Re: Infinite Loading Screen
« Reply #1 on: April 05, 2019, 10:30:35 PM »
That seems you are missing LoadAllAnim function, try to add this into your script:
Code: [Select]
function LoadAllAnim()
local AnimationGroup = {
"Authority","Boxing","B_Striker","CV_Male","DO_Edgar","DO_Grap","DO_StrikeCombo","DO_Striker","F_Adult","F_BULLY",
"F_Crazy","F_Douts","F_Girls","F_Greas","F_Jocks","F_Nerds","F_OldPeds","F_Pref","F_Preps","G_Grappler","G_Johnny",
"G_Striker","Grap","J_Damon","J_Grappler","J_Melee","J_Ranged","J_Striker","LE_Orderly","Nemesis","N_Ranged","N_Striker",
"N_Striker_A","N_Striker_B","P_Grappler","P_Striker","PunchBag","Qped","Rat_Ped","Russell","Russell_Pbomb","Straf_Dout",
"Straf_Fat","Straf_Female","Straf_Male","Straf_Nerd","Straf_Prep","Straf_Savage","Straf_Wrest","TE_Female","1_02BYourSchool",
"1_02_MeetWithGary","1_03The Setup","1_04TheSlingshot","1_06ALittleHelp","1_07_SaveBucky","1_07_Sk8Board","1_08ThatBitch",
"1_08_MandPuke","1_09_Candidate","1_10Betrayal","1_11B_HeBigPrank","1_G1_TheDiary","1_S01HatVsGall","2_01LastMinuteShop",
"2_02ComicKlepto","2_05TadsHouse","2_06MovieTickets","2_07BeachRumble","2_08WeedKiller","2_4RichAreaRace","2_G2CarnivalDate",
"2_G2_GiftExchange","2_R03PaperRoute","2_S02CharSheets","2_S04CharSheets","2_S05_CooksCrush","2_S06PantyRaid","3_01JealousJohnny",
"3_04WrongPtTown","3_05TheTenements","3_BFightJohnnyV","3_G3","3_R05ChemicalDeliv","3_R08RaceLeague","3_S03CheatinTime",
"4_01Paparazzi","4_04_FunhouseFun","4_06BigGame","4_B2_JockBossBattle","5_01Grp","5_01Rats","5_02PrVandalized","5_05Zoe",
"5_09MakingAMark","6B_PARA","AGymLght","Ambient","Ambient2","Ambient3","ANIBBALL","AniBroom","AniDice","AniFooty","AniGlobe",
"AnimSave","AniPillo","ARC3D","Area_Asylum","Area_Funhouse","Area_GirlsDorm","Area_Infirmary","Area_School","Area_Tenements",
"Armor","AsyBars","AsyDoorB","AsyDoors","AsyGate","AsyLever","AsySwtch","AtcPlank","Authority","BANANA","barelLad","BarrGate",
"BATON","BBALL_21","bbgun","BCatcher","BdrDoorL","BeardLady","Bike","BikeGar","BoldRoll","BoltCutt","Boxing","BoxRopes",
"BRDoor","BrkSwtch","BROCKETL","BRSwitch","BusDoors","Butcher","BXPBag","B_Striker","CarnCurt","CARNI01","carnies","Car_Ham",
"Cavalier","Cheer_Cool1","Cheer_Cool2","Cheer_Cool3","Cheer_Gen1","Cheer_Gen2","Cheer_Gen3","Cheer_Girl1","Cheer_Girl2",
"Cheer_Girl3","Cheer_Girl4","Cheer_Nerd1","Cheer_Nerd2","Cheer_Nerd3","Cheer_Posh1","Cheer_Posh2","Cheer_Posh3","Chem_Set",
"ChLead_Idle","CLadderA","CnGate","Coaster","COPBIKE","Cop_Frisk","CV_Female","CV_Male","C_Wrestling","DartBrd","DartCab",
"DodgeBall","DodgeBall2","DoorStr1","DRBrace","Drumming","DuffBag","DunkBttn","DunkSeat","Earnest","EnglishClass","ErrandCrab",
"Errand_BUS","Errand_IND","Errand_RIC","Errand_SCH","ESCDoorL","ESCDoorR","ExtWind","FDoor","FDoorB","FDoorC","Ferris","FGhost",
"FGoblin","FlagA","FLbBook","FlbLader","FLbPaint","FLbTable","FMCntrl","FMDoor","FMTrapDr","FMTrapSw","FortTell","funCart","funCurtn",
"funMiner","funRocks","FunTeeth","FXTestG","GarbCanA","GatCool","GEN_SOCIAL","Gfight","GhostDrs","Gift","Go_Cart","GymHoop","GymWLad",
"Halloween","HallWind","Hang_Jock","Hang_Moshing","Hang_Talking","Hang_Workout","Hobos","Hobo_Cheer","HSdinger","HUMIL_4-10_B",
"HUMIL_4-10_C","HUMIL_5-8F_A","HUMIL_5-8F_B","HUMIL_5-8V4-10","HUMIL_5-8V6-1","HUMIL_5-8VPLY","HUMIL_5-8_A","HUMIL_5-8_B",
"HUMIL_5-8_C","HUMIL_6-1V4-10","HUMIL_6-1V6-1","HUMIL_6-1VPLY","HUMIL_6-1_A","HUMIL_6-1_B","HUMIL_6-1_C","HUMIL_6-5V4-10",
"HUMIL_6-5V6-1","HUMIL_6-5VPLY","HUMIL_6-5_A","HUMIL_6-5_B","HUMIL_6-5_C","IDLE_AUTH_A","IDLE_AUTH_B","IDLE_AUTH_C","IDLE_AUTH_D",
"IDLE_BULLY_A","IDLE_BULLY_B","IDLE_BULLY_C","IDLE_BULLY_D","IDLE_CIVF_A","IDLE_CIVF_B","IDLE_CIVF_C","IDLE_CIVM_A","IDLE_CIVM_B",
"IDLE_CIVM_C","IDLE_DOUT_A","IDLE_DOUT_B","IDLE_DOUT_C","IDLE_DOUT_D","IDLE_FATG_A","IDLE_FATG_B","IDLE_FATG_C","IDLE_FAT_A",
"IDLE_FAT_B","IDLE_FAT_C","IDLE_GREAS_A","IDLE_GREAS_B","IDLE_GREAS_C","IDLE_GREAS_D","IDLE_GSF_A","IDLE_GSF_B","IDLE_GSF_C",
"IDLE_JOCK_A","IDLE_JOCK_B","IDLE_JOCK_C","IDLE_JOCK_D","IDLE_NERD_A","IDLE_NERD_B","IDLE_NERD_C","IDLE_NERD_D","IDLE_NGIRL",
"IDLE_PREP_A","IDLE_PREP_B","IDLE_PREP_C","IDLE_PREP_D","IDLE_SEXY_A","IDLE_SEXY_B","IDLE_SEXY_C","INDgateC","JPhoto","JunkCarA",
"JV_Asylum","KISS1","KISS2","KISS3","KISS4","KissAdult","KISSB","KISSF","LckrGymA","LE_Officer","Mermaid","MG_Craps","MINIBIKE",
"MINICHEM","MINIDARTS","MINIDunk","MINIGraf","MINIHACKY","MINI_Arm","MINI_BallToss","MINI_Lock","MINI_React","Miracle","MOWER",
"MPostA","N2B Dishonerable","nerdBar1","NIS_0_00A","NIS_1_02","NIS_1_02B","NIS_1_03","NIS_1_04","NIS_1_05","NIS_1_07","NIS_1_08_1",
"NIS_1_09","NIS_1_11","NIS_2_01","NIS_2_03","NIS_2_04","NIS_2_06_1","NIS_2_B","NIS_2_S04","NIS_3_01","NIS_3_02","NIS_3_04",
"NIS_3_05","NIS_3_06","NIS_3_08","NIS_3_11","NIS_3_B","NIS_3_G3","NIS_3_R09_D","NIS_3_R09_G","NIS_3_R09_J","NIS_3_R09_N","NIS_3_R09_P",
"NIS_3_S03","NIS_3_S03_B","NIS_3_S11","NIS_4_01","NIS_4_05","NIS_4_06","NIS_4_B2","NIS_5_01","NIS_5_02","NIS_5_03","NIS_5_04",
"NIS_5_05","NIS_5_07","NIS_5_G5","NIS_6_02","NIS_6_03","NLock01A","NPC_Adult","NPC_AggroTaunt","NPC_Chat_1","NPC_Chat_2",
"NPC_Chat_F","NPC_Cheering","NPC_Love","NPC_Mascot","NPC_NeedsResolving","NPC_Principal","NPC_Shopping","NPC_Spectator",
"ObsDoor","OBSMotor","ObsPtf_1","ObsPtf_2","Pageant","PedCoaster","Player_Tired","Player_VTired","POI_Booktease","POI_Cafeteria",
"POI_ChLead","POI_Gen","POI_Smoking","POI_Telloff","POI_WarmHands","POI_Worker","PortaPoo","PrepDoor","pxHoop","pxLad10M",
"Px_Arcade","Px_Bed","Px_Fountain","Px_Garb","Px_Gen","Px_Ladr","Px_Rail","Px_RedButton","Px_Sink","Px_Tlet","Px_Tree","RAT_PED",
"Reeper","RMailbox","Santa_Lap","SAUTH_A","SAUTH_F","SAUTH_X","SBarels1","SBULL_A","SBULL_F","SBULL_S","SBULL_U","SBULL_X",
"Scaffold","SCbanpil","SCBell","SCDoor","ScGate","SCgrdoor","scObsDr","ScoolBus","SCOOTER","SecDoorL","SecDoorR","Sedan","ShopBike",
"SHUMIL_01","SHWR","SIAMESE","Siamese2","Sitting_Boys","SK8Board","Skateboard","SkeltonMan","Slingsh","SNERD_A","SNERD_F",
"SNERD_I","SNERD_S","SNGIRLS","SNGIRL_D","SNGIRL_F","SnowBlob","SnowMND","SnowWall","SOLD_A","SOLD_F","SOLD_I","SOLD_S","SPLAY_A",
"SPLAY_B","SprayCan","SpudG","Squid","StalDoor","TrackSW","TreeFall","Truck","Try_Clothes","Umbrella","VFlytrap","V_Bike",
"V_Bike_Races","V_COPBIKE","V_SCOOTER","WPCannon","WPSheldB","WPShield","WPTurret","W_BBall","W_BBallBat","W_BRocket","W_Camera",
"W_CherryBomb","W_CHShield","W_FlashLight","W_Fountain","W_Itchpowder","W_JBroom","W_Lid","W_PooBag","W_PRANK","W_Slingshot",
"W_Snowball","W_snowshwl","W_SprayCan","W_SpudGun","W_Stick","W_Thrown","W_wtrpipe"
}
for k,Anim in ipairs(AnimationGroup) do
if HasAnimGroupLoaded(Anim) == false then
LoadAnimationGroup(Anim)
end
end
end

And in order to spawn Petey, you should use PedCreateXYZ function instead of PedCreate which function does not exist in the game, and the correct arguments for the function is PedIndex,X,Y,Z so you don't have to put the area code in there. After all, your function should be look like this pete = PedCreateXYZ(134,-494,320,31) 134 is Petey's ped index. If you don't know where to find these index, you can find it on the default.ide in your Objects folder.
« Last Edit: April 05, 2019, 10:35:23 PM by Altamurenza »