micheal1230 Posted January 27, 2012 Share Posted January 27, 2012 Can Someone Tell Me How To Make Music Play At My Login Screen and how do i create a ped in a script, i belive Its createPed then some code Link to comment
Klesh Posted January 27, 2012 Share Posted January 27, 2012 (edited) addEventHandler("onPlayerLogin", getRootElement(), function () playSound("sounds/login.mp3") -- That will play the sound when player login. setSoundVolume(0.9) end) addEventHandler("onResourceStart", getRootElement(getThisResource()), function () createPed ( skin, x, y, z) --x, y, z are the coords where will be created the ped, the skin is the skin id will be created end) You can see : Skins ids on https://wiki.multitheftauto.com/wiki/Character_Skins Edited January 27, 2012 by Guest Link to comment
Kenix Posted January 27, 2012 Share Posted January 27, 2012 Client side local sound addEventHandler( "onClientResourceStart",resourceRoot, function( ) createPed( 0,0,0,0 ) --[[ creating ped ]] sound = playSound( "some.mp3" ) --[[ You need add to meta.xml this line <file src="some.mp3" /> ]] end ) addEventHandler( "onClientPlayerSpawn",localPlayer, function( ) if sound then stopSound( sound ) -- stop sound if player spawned for example sound = nil end end ) https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/Cli ... _Functions https://wiki.multitheftauto.com/wiki/PlaySound https://wiki.multitheftauto.com/wiki/CreatePed Klesh,Your code is wrong. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now