Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetPlayerClothes()
- local CLOTHES = {
- {
- {0, "SP_80Rocker_H"},
- {0, "SP_Alien_H"},
- {0, "C_AngelHalo"},
- {0, "P_Army2"},
- {0, "P_Army1"},
- {0, "P_Army3"},
- {0, "SP_BMXhelmet"},
- {0, "B_BHat2"},
- {0, "B_BHat1"},
- {0, "B_BHat4"},
- {0, "B_BHat3"},
- {0, "B_BHat6"},
- {0, "B_BHat5"},
- {0, "P_Bandana3"},
- {0, "P_Bandana1"},
- {0, "P_Bandana2"},
- {0, "SP_Zorromask"},
- {0, "SP_Basshat"},
- {0, "B_Bucket1"},
- {0, "SP_BikeHelmet"},
- {0, "SP_Ninja_H"},
- {0, "S_BHat1"},
- {0, "S_BHat3"},
- {0, "S_BHat2"},
- {0, "S_Sunvisor1"},
- {0, "S_Sunvisor3"},
- {0, "S_Sunvisor2"},
- {0, "SP_Goldsuit_H"},
- {0, "P_BHat6"},
- {0, "P_BHat1"},
- {0, "P_BHat2"},
- {0, "P_BHat3"},
- {0, "P_BHat4"},
- {0, "P_BHat5"},
- {0, "C_CanadaHat"},
- {0, "C_ClownWig"},
- {0, "SP_Cowboyhat"},
- {0, "B_Various5"},
- {0, "SP_GK_Helmet"},
- {0, "C_DevilHorns"},
- {0, "SP_Duncehat"},
- {0, "SP_EdnaMask"},
- {0, "SP_EiffelHat"},
- {0, "SP_Elf_H"},
- {0, "SP_Colum_H"},
- {0, "SP_Firehat"},
- {0, "SP_Fries_H"},
- {0, "SP_Einstein"},
- {0, "SP_Gnome_H"},
- {0, "SP_MortarBhat"},
- {0, "SP_NinjaW_H"},
- {0, "SP_Hazmat"},
- {0, "SP_GymDisguise"},
- {0, "B_Various1"},
- {0, "R_Hat3"},
- {0, "R_Hat2"},
- {0, "R_Hat1"},
- {0, "SP_MBand_H"},
- {0, "SP_Mascot_H"},
- {0, "SP_Nerd_H"},
- {0, "B_Hunter1"},
- {0, "SP_Nutcrack_H"},
- {0, "B_Hunter2"},
- {0, "R_Hat4"},
- {0, "SP_Panda_H"},
- {0, "SP_PigMask"},
- {0, "SP_PirateHat"},
- {0, "SP_PithHelmet"},
- {0, "R_Hat5"},
- {0, "SP_Pumpkin_head"},
- {0, "SP_Nascar_H"},
- {0, "SP_NinjaR_H"},
- {0, "SP_Antlers"},
- {0, "B_Various2"},
- {0, "SP_Ween_H"},
- {0, "C_StrangeHat"},
- {0, "R_Hat6"},
- {0, "B_Various3"},
- {0, "B_Various4"},
- {0, "SP_Pophat"},
- {0, "B_Hunter3"},
- {0, "B_Bucket2"},
- {0, "SP_VHelmet"},
- {0, "SP_Werewolf"},
- {0, "SP_Wrestling_H"},
- },
- {
- {1, "B_LSleeves3"},
- {1, "SP_80Rocker_T"},
- {1, "R_SSleeves4"},
- {1, "R_SSleeves6"},
- {1, "R_SSleeves5"},
- {1, "SP_Alien_T"},
- {1, "R_LSleeves1"},
- {1, "R_Sweater5"},
- {1, "R_Sweater1"},
- {1, "P_Jacket5"},
- {1, "P_Jacket4"},
- {1, "P_Sweater3"},
- {1, "P_Sweater2"},
- {1, "S_Sweater1"},
- {1, "SP_BandShirt"},
- {1, "SP_BikeJersey"},
- {1, "P_Jacket1"},
- {1, "B_Jacket2"},
- {1, "SP_Ninja_T"},
- {1, "SP_Boxing_T"},
- {1, "B_Jersey1"},
- {1, "B_Jacket6"},
- {1, "S_LSleeves2"},
- {1, "S_LSleeves1"},
- {1, "S_Jacket3"},
- {1, "S_Jacket4"},
- {1, "S_Sweater5"},
- {1, "SP_XmsSweater"},
- {1, "B_Sweater4"},
- {1, "P_SSleeves2"},
- {1, "B_SSleeves1"},
- {1, "R_Jacket2"},
- {1, "SP_Elf_T"},
- {1, "SP_Colum_T"},
- {1, "P_SSleeves5"},
- {1, "B_Jersey8"},
- {1, "B_Jersey7"},
- {1, "P_Jacket6"},
- {1, "SP_Goldsuit_T"},
- {1, "SP_Gnome_T"},
- {1, "B_Jacket1"},
- {1, "SP_NinjaW_T"},
- {1, "SP_Wrestling_T"},
- {1, "B_SSleeves3"},
- {1, "SP_HipShirt"},
- {1, "B_Jersey10"},
- {1, "B_Jersey9"},
- {1, "P_Sweater4"},
- {1, "P_Sweater5"},
- {1, "P_Sweater6"},
- {1, "B_Jacket3"},
- {1, "R_Jacket5"},
- {1, "R_Sweater4"},
- {1, "R_Sweater3"},
- {1, "P_Jacket2"},
- {1, "B_LSleeves2"},
- {1, "P_LSleeves7"},
- {1, "P_LSleeves2"},
- {1, "P_LSleeves8"},
- {1, "P_LSleeves6"},
- {1, "P_LSleeves3"},
- {1, "P_LSleeves4"},
- {1, "P_LSleeves1"},
- {1, "P_LSleeves5"},
- {1, "SP_MBand_T"},
- {1, "SP_MathShirt"},
- {1, "P_SSleeves1"},
- {1, "SP_Fries_T"},
- {1, "SP_MuscleShirt"},
- {1, "SP_MusicPJ_T"},
- {1, "SP_MusicShirt"},
- {1, "SP_Nerd_T"},
- {1, "P_LSleeves9"},
- {1, "SP_Nutcrack_T"},
- {1, "P_Jacket3"},
- {1, "SP_Orderly_T"},
- {1, "SP_Prison_T"},
- {1, "P_Sweater1"},
- {1, "SP_Nascar_T"},
- {1, "SP_NinjaR_T"},
- {1, "P_Sweater7"},
- {1, "P_Sweater8"},
- {1, "R_SSleeves2"},
- {1, "R_SSleeves1"},
- {1, "B_Jersey6"},
- {1, "B_Jersey5"},
- {1, "S_Sweater2"},
- {1, "B_Sweater3"},
- {1, "SP_PieShirt"},
- {1, "SP_Ween_T"},
- {1, "SP_PJ_T"},
- {1, "B_Jersey4"},
- {1, "B_Jersey3"},
- {1, "C_StpdShrt"},
- {1, "P_SSleeves9"},
- {1, "P_SSleeves4"},
- {1, "P_SSleeves10"},
- {1, "P_SSleeves8"},
- {1, "P_SSleeves6"},
- {1, "P_SSleeves3"},
- {1, "P_SSleeves7"},
- {1, "S_LSleeves3"},
- {1, "S_LSleeves4"},
- {1, "B_SSleeves2"},
- {1, "R_Jacket1"},
- {1, "P_SSleeves12"},
- {1, "P_SSleeves13"},
- {1, "P_SSleeves14"},
- {1, "P_SSleeves11"},
- {1, "R_Sweater2"},
- {1, "B_LSleeves4"},
- {1, "P_LSleeves10"},
- {1, "R_LSleeves2"},
- {1, "R_LSleeves5"},
- {1, "R_LSleeves4"},
- {1, "B_Sweater2"},
- },
- {
- {2, "R_Watch1"},
- {2, "R_Watch3"},
- {2, "R_Watch2"},
- {2, "R_Watch4"},
- {2, "SP_Boxing_G_L"},
- {2, "P_Watch1"},
- {2, "C_PinkWatch"},
- {2, "S_Wristband1"},
- {2, "S_Wristband4"},
- {2, "S_Wristband6"},
- },
- {
- {3, "P_Wristband8"},
- {3, "P_Wristband7"},
- {3, "SP_Boxing_G_R"},
- {3, "R_Wristband1"},
- {3, "R_Wristband4"},
- {3, "R_Wristband2"},
- {3, "R_Wristband3"},
- {3, "B_Wristband1"},
- {3, "P_Wristband6"},
- {3, "P_Wristband2"},
- {3, "SP_NerdWatch"},
- {3, "P_Wristband1"},
- {3, "P_Wristband5"},
- {3, "P_Wristband3"},
- {3, "S_Wristband2"},
- {3, "S_Wristband3"},
- {3, "S_Wristband5"},
- {3, "P_Wristband4"},
- {3, "B_Wristband2"},
- {3, "B_Wristband3"},
- {3, "B_Wristband4"},
- {3, "B_Wristband5"},
- },
- {
- {4, "B_Shorts7"},
- {4, "B_Shorts6"},
- {4, "B_Shorts2"},
- {4, "SP_80Rocker_L"},
- {4, "SP_Alien_L"},
- {4, "R_Pants5"},
- {4, "R_Pants4"},
- {4, "B_Pants1"},
- {4, "B_Shorts1"},
- {4, "SP_BikeShorts"},
- {4, "P_Pants5"},
- {4, "SP_Ninja_L"},
- {4, "SP_Boxing_L"},
- {4, "S_Pants3"},
- {4, "S_Shorts4"},
- {4, "S_Shorts6"},
- {4, "S_Shorts5"},
- {4, "B_Shorts3"},
- {4, "C_ClownPants"},
- {4, "B_Pants4"},
- {4, "B_Pants8"},
- {4, "SP_Elf_L"},
- {4, "SP_Colum_L"},
- {4, "P_Pants6"},
- {4, "SP_Goldsuit_L"},
- {4, "SP_Gnome_L"},
- {4, "SP_NinjaW_L"},
- {4, "SP_Wrestling_L"},
- {4, "P_Pants3"},
- {4, "SP_PJ_L"},
- {4, "B_Pants2"},
- {4, "P_Pants7"},
- {4, "R_Pants3"},
- {4, "R_Pants2"},
- {4, "SP_MBand_L"},
- {4, "SP_Fries_L"},
- {4, "SP_MusicPJ_L"},
- {4, "SP_Nerd_L"},
- {4, "SP_Nutcrack_L"},
- {4, "SP_Orderly_P"},
- {4, "P_Pants4"},
- {4, "P_Pants1"},
- {4, "SP_Prison_L"},
- {4, "SP_Nascar_L"},
- {4, "B_Pants3"},
- {4, "SP_NinjaR_L"},
- {4, "P_Pants2"},
- {4, "R_Shorts1"},
- {4, "R_Shorts5"},
- {4, "R_Shorts2"},
- {4, "R_Shorts3"},
- {4, "R_Shorts4"},
- {4, "SP_Shorts"},
- {4, "S_Shorts1"},
- {4, "S_Pants1"},
- {4, "SP_Ween_L"},
- {4, "B_Shorts5"},
- {4, "B_Shorts4"},
- {4, "SP_Briefs"},
- {4, "SP_Swimsuit"},
- {4, "B_Pants7"},
- {4, "B_Pants6"},
- {4, "R_Pants1"},
- },
- {
- {5, "SP_80Rocker_FT"},
- {5, "R_Boots2"},
- {5, "R_Sneakers4"},
- {5, "P_Boots4"},
- {5, "SP_Ninja_FT"},
- {5, "P_Sneakers16"},
- {5, "SP_Boxing_ft"},
- {5, "B_Sneakers3"},
- {5, "P_Sneakers18"},
- {5, "B_Sneakers12"},
- {5, "S_Sneakers2"},
- {5, "P_Sneakers2"},
- {5, "C_ClownShoes"},
- {5, "R_Boots3"},
- {5, "B_Sneakers2"},
- {5, "B_Boots2"},
- {5, "SP_Elf_FT"},
- {5, "SP_Colum_FT"},
- {5, "B_Boots1"},
- {5, "B_Boots4"},
- {5, "B_Boots3"},
- {5, "P_Sneakers17"},
- {5, "P_Sneakers9"},
- {5, "P_Sneakers14"},
- {5, "P_Sneakers10"},
- {5, "P_Sneakers15"},
- {5, "SP_Goldsuit_ft"},
- {5, "SP_Gnome_ft"},
- {5, "SP_NinjaW_FT"},
- {5, "S_Sneakers1"},
- {5, "R_Sneakers1"},
- {5, "R_Sneakers2"},
- {5, "R_Sneakers3"},
- {5, "P_Sneakers3"},
- {5, "P_Sneakers7"},
- {5, "P_Sneakers4"},
- {5, "P_Sneakers5"},
- {5, "P_Sneakers6"},
- {5, "SP_MBand_FT"},
- {5, "SP_Mascot_B"},
- {5, "P_Boots3"},
- {5, "SP_Nerd_FT"},
- {5, "SP_Nutcrack_FT"},
- {5, "P_Boots1"},
- {5, "SP_Orderly_B"},
- {5, "SP_Panda_B"},
- {5, "SP_Nascar_FT"},
- {5, "SP_NinjaR_FT"},
- {5, "B_Sneakers10"},
- {5, "B_Sneakers8"},
- {5, "B_Sneakers9"},
- {5, "B_Sneakers6"},
- {5, "R_Sneakers5"},
- {5, "P_Sneakers8"},
- {5, "B_Sneakers1"},
- {5, "P_Sneakers19"},
- {5, "P_Sneakers13"},
- {5, "P_Sneakers11"},
- {5, "P_Sneakers12"},
- {5, "SP_Socks"},
- {5, "B_Sneakers5"},
- {5, "B_Sneakers4"},
- {5, "B_Sneakers13"},
- {5, "B_Sneakers11"},
- {5, "P_Sneakers1"},
- {5, "P_Boots2"},
- {5, "B_Boots5"},
- {5, "SP_Wrestling_ft"},
- },
- }
- local c = {}
- for i = 0, 5 do
- for _, v in ipairs(CLOTHES[i+1]) do
- if v[1] == i then
- local index, id = ClothingGetPlayer(i)
- --if ClothingGetPlayer(i) == ObjectNameToHashID(v[2]) then
- if index == ObjectNameToHashID(v[2]) then
- c[i] = v[2]
- end
- end
- end
- c[i] = c[i] ~= '' and c[i] or ''
- end
- return c
- end
- function main()
- while not SystemIsReady() do
- Wait(0)
- end
- local motor = {[275] = true, [276] = true}
- local pakaian = {}
- local kendaraan
- local udahPakeHelm = false
- while true do
- Wait(0)
- if PlayerIsInAnyVehicle() and motor[VehicleGetModelId(VehicleFromDriver(gPlayer))] then
- kendaraan = VehicleFromDriver(gPlayer)
- while PlayerIsInVehicle(kendaraan) do
- Wait(0)
- if not udahPakeHelm then -- MUST ADD THIS BEFORE THE LINE BELOW TO AVOID CRASH
- local index, id = ClothingGetPlayer(0)
- --if ClothingGetPlayer(0) ~= ObjectNameToHashID("SP_BikeHelmet") then -- CRASH IF THIS STATEMENT IS PLACED DIRECTLY AFTER LOOP
- if index ~= ObjectNameToHashID("SP_BikeHelmet") then
- pakaian = GetPlayerClothes()
- ClothingSetPlayer(0, "SP_BikeHelmet")
- ClothingBuildPlayer()
- udahPakeHelm = true
- --collectgarbage()
- end
- end
- end
- while not PedMePlaying(gPlayer, "Default_KEY") do
- Wait(0)
- end
- ClothingSetPlayerOutfit("Uniform")
- ClothingBuildPlayer()
- for i = 0, 5 do
- if pakaian[i] ~= '' then
- ClothingSetPlayer(i, pakaian[i])
- ClothingBuildPlayer()
- end
- end
- --ClothingBuildPlayer()
- udahPakeHelm = false
- --collectgarbage()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement