Ujeelka Posted September 6, 2009 Posted September 6, 2009 Hello! I cant find on wiki how can i add a player animation. I do not know where to start. I want to sit down on a bench when i type /sit ( which is the animation to sit on bench ?). function ?????? setPlayerAnimation -- This code is for animation ?? setPlayerAnimation( player, "player", "WOMAN_idle") end addCommandHandler("sit", ??????)
DiSaMe Posted September 6, 2009 Posted September 6, 2009 Many peds functions can be used on players. Try this: function makePlayerSitDown(player,cmdname) setPedAnimation(player,"ped","SEAT_idle",-1,true,false,true) end addCommandHandler("sit",makePlayerSitDown) -
Ujeelka Posted September 6, 2009 Author Posted September 6, 2009 Many peds functions can be used on players. Try this: function makePlayerSitDown(player,cmdname) setPedAnimation(player,"ped","SEAT_idle",-1,true,false,true) end addCommandHandler("sit",makePlayerSitDown) Thank you very much for help ! Now i try to add a command to stopAnimation...i think...
Gamesnert Posted September 7, 2009 Posted September 7, 2009 setPedLookAt (client-side only) Projects: Slothbot | Maximap
Ujeelka Posted September 7, 2009 Author Posted September 7, 2009 ok... i make this for stop animation...i think its good (i want to stop animation when i type /stop) function makePlayerSitDown(player,cmdname) setPedAnimation(player,"ped","SEAT_idle",-1,true,false,true) end addCommandHandler("sit",makePlayerSitDown) function stopAnimation(player,cmdname) addCommandHandler("stop",stopAnimation)
Gamesnert Posted September 7, 2009 Posted September 7, 2009 Eh, calling a function "stopAnimation" and not even ending it will only give you errors. You can cancel animations with setPedAnimation. Read the text on the top of the page. Projects: Slothbot | Maximap
RedKacsa Posted May 30, 2018 Posted May 30, 2018 I should have a robbery script in a robbery animation (cat_safe_rob) if someone could help the whole script here, and if anyone knows where and what to write, to take a robbery animation for a few seconds, you can paste it for me. Thanks in advance. Script: function createRob() Marker = createMarker ( 1788.9731445313,-1123.0570068359,23.5, "cylinder", 1, 255, 0, 0, 5 ) setElementCollisionsEnabled( Marker, false ) bl = createBlipAttachedTo(Marker,45) outputChatBox( "", root, 0, 255, 0 ) end addEventHandler("onResourceStart", resourceRoot,createRob) addEventHandler("onMarkerLeave",root, function ( player ) if ( source ~= Marker ) then return end if ( isPedInVehicle( player ) ) then return end destroyElement( Marker ) destroyElement( bl ) randomMoney = math.random ( 22000, 22000 ) randomWanted = math.random ( 5, 5 ) givePlayerMoney(player,randomMoney) setPlayerWantedLevel ( player, randomWanted ) robPlayer = getPlayerName(player) outputChatBox("",root,0,255,0,true) setTimer( createRob, 600000, 1 ) end )
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