Jump to content

roddydennvor

Members
  • Posts

    132
  • Joined

  • Last visited

Everything posted by roddydennvor

  1. i use vehicle crash system , so when i got an accident , i will get out from vehicle and play anim /crack , but how to edit this , so when i use belt , i can't throw out of vehicle ?
  2. but how to add , when i use seat belt , i can't press "F" or "ENTER" , So i must to released my belt first ??
  3. Hii there ,, This is belt script function seatbelton ( player ) local check = isPedInVehicle ( player ) if ( check ) then local state = ( not getElementData ( player, "seatbelt" ) ) setElementData ( player, "seatbelt", state ) exports.global:sendLocalMeAction ( player, "takes their seatbelt ".. ( state and "on" or "off" ) ) else outputChatBox ( "You are not in a car!", player, 255, 0, 0 ) end end addCommandHandler ( "seatbelt", seatbelton ) How to edit this script , so when i use the belt, then nobody can hijack my car ,, And when i use the belt , then i can't throw out from vehicle when crash...
  4. it's zipped , you can't download on format .zip , they will unzip first and then you download it
  5. I just edit this script from command to event handler , But how to add this to item system , so when i use helmet (item id 90) then this event running ... Thx B4 addEvent( "helmet", true ) local cases = {} for i,v in ipairs(getElementsByType("player"))do setElementData(v, "helmet", 0) end function helmet( source ) if (getResourceState(getResourceFromName("bone_attach")) == "running") then if (getElementData(source, "helmet") ~=1) then setElementData(source, "helmet", 1) case = createObject(1210,0,0,0) exports.bone_attach:attachElementToBone(case,source,12,0,0.05,0.27,0,180,0) cases[source] = case outputChatBox("Helmet:- True.", source, 0, 255, 0) else setElementData(source, "helmet", 0) exports.bone_attach:detachElementFromBone(cases[source]) destroyElement(cases[source]) outputChatBox("Helmet:- False.", source, 255, 50, 0) end else outputChatBox("ERROR #2 Resource not found.", source, 255, 50, 0) end end addEventHandler( "helmet", root, helmet )
  6. Just add event with this function ?? function seatbelton ( player ) if isPedInVehicle ( player ) then if getElementData ( player, "seatbelt" ) ) then cancelEvent () end end end addEventHandler ( "onVehicleStartExit", getRootElement(), seatbelton )
  7. Hii anyone , how to change this script , so when seatbelt is on , then the player can't get out from vehicle and when seatbelt on then cancelEvent 'crashThrowPlayerFromVehicle' function seatbelton ( player ) local check = isPedInVehicle ( player ) if ( check ) then local state = ( not getElementData ( player, "seatbelt" ) ) setElementData ( player, "seatbelt", state ) exports.global:sendLocalMeAction ( player, "takes their seatbelt ".. ( state and "on" or "off" ) ) else outputChatBox ( "You are not in a car!", player, 255, 0, 0 ) end end addCommandHandler ( "seatbelt", seatbelton )
  8. Do you know how to edit LSPD building ?? I can't found .txd file
  9. Not working to.. Here is debugscript code [2015-03-20 09:48:52] WARNING: toys/toys.lua:20: Bad argument @ 'destroyElement' [Expected element at argument 1, got nil]
  10. I just edit this script Server.lua addEvent( "helmet", true ) local cases = {} for i,v in ipairs(getElementsByType("player"))do setElementData(v, "helmet", 0) end function helmet(player) if (getResourceState(getResourceFromName("bone_attach")) == "running") then if (getElementData(source, "helmet") ~=1) then setElementData(source, "helmet", 1) case = createObject(1210,0,0,0) exports.bone_attach:attachElementToBone(case,player,12,0,0.05,0.27,0,180,0) cases[source] = case outputChatBox("Helmet:- True.", source, 0, 255, 0) else setElementData(source, "helmet", 0) exports.bone_attach:detachElementFromBone(cases[source]) destroyElement(cases[source]) outputChatBox("Helmet:- False.", source, 255, 50, 0) end else outputChatBox("ERROR #2 Resource not found.", source, 255, 50, 0) end end addEventHandler( "helmet", root, helmet ) Item server elseif (itemID==90) then --Helmet triggerServerEvent("helmet", source) takeItemFromSlot(source, itemSlot) I just try this, but i just get an output like this: Helmet:- True. why only outputs are working, why the helmet does not appear... I just change object to 1210, it's original files, 1210 is case, but it does not appear too Your help is greatly appreciated
  11. I just add this event as server side, but when i try this , i got error like this : ERROR: Client (Arthur_Alvaro) triggered serverside event helmet, but event is not added serverside
  12. I just edit this script from command to event handler , But how to add this to item system , so when i use helmet (item id 90) then this event running ... Thx B4 addEvent( "helmet", true ) local cases = {} for i,v in ipairs(getElementsByType("player"))do setElementData(v, "helmet", 0) end function helmet(player) if (getResourceState(getResourceFromName("bone_attach")) == "running") then if (getElementData(source, "helmet") ~=1) then setElementData(source, "helmet", 1) case = createObject(2054,0,0,0) exports.bone_attach:attachElementToBone(case,source,1,0,0.04,0.06,0,0,180) cases[source] = case outputChatBox("Helmet:- True.", source, 0, 255, 0) else setElementData(source, "helmet", 0) exports.bone_attach:detachElementFromBone(cases[source]) destroyElement(cases[source]) outputChatBox("Helmet:- False.", source, 255, 50, 0) end else outputChatBox("ERROR #2 Resource not found.", source, 255, 50, 0) end end addEventHandler( "helmet", player, helmet )
  13. Solve : Optional Arguments NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments. block: the animation block's name. anim: the name of the animation within the block. time: how long the animation will run for in milliseconds. loop: indicates whether or not the animation will loop. updatePosition: will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations. interruptable: if set to 'false' other tasks wont be able to interupt the animation. Setting this to 'false' also gives this function more power to override other animations that are running. For example, squatting after a jump can be terminated. freezeLastFrame: ... (From 1.1 onwards).
  14. can you explain me what i must to fill in block ? at anim i must to fill anim type right ?
  15. Hii there !! Can someone help me to make script when i type like : Hii < 3 character , then i will play some anim 3 second But if i type 5 character like Hello , then i will play some anim 5 second ? 1 character 1 second ...
  16. i forget to add "function updateNametagColor(thePlayer)"
  17. haha i can make this script ! yeah,,, so simple but make me confused thanks for your help Solidsnake14 ,, Please Lock this thread
  18. function updateNametagColor(thePlayer) if getElementData(thePlayer, "hoursplayed") < 13 then setPlayerNametagColor(thePlayer, 255, 255, 0) end end
  19. im so confused .. I just want to make that script from zero.. Can you help me to make this script ?
  20. s_nametag local hoursplayed = getElementData(thePlayer, "hoursplayed") if hoursplayed < 13 then exports.global:updateNametagColor(source) end nametag function updateNametagColor(thePlayer) if getElementData(thePlayer, "hoursplayed") < 13 then setPlayerNametagColor(thePlayer, 255, 255, 0) end end for key, value in ipairs( getElementsByType( "player" ) ) do updateNametagColor( value ) end
×
×
  • Create New...