Jump to content

crazyde21

Members
  • Posts

    27
  • Joined

  • Last visited

Details

  • Gang
    No

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

crazyde21's Achievements

Advanced Member

Advanced Member (8/54)

0

Reputation

  1. When I create a GUI font and "guiSetFont" Everything is OK! But when I use other languages​​, such as Chinese, "guiSetFont" The Chinese have no effect! But English there is the effect!? Why? How to solve? Or "mtasa" not compatible? ————————————Gorgeous dividing line—————————————— Note: I use tool call "Font Creator" I tried one approach: that is, edit "TTF" file !!! Yes, you heard wrong when I edit "TTF" I found other languages ​​(Chinese)! Then: I right-click a word (Chinese) and click Properties,—> map—> I found the map Chinese fonts are Type "Unicode"! Such as "幼" is the word, it's "Unicode == $5E7C" (\ u5e7c) ~~(CJK Unified Ideographs) When I enter the "幼" is the word in the game, it does not change the system font ~ is ~ But when i use the Unicode "Basic Latin" it can work! As such I try to replace "Basic Latin" "CJK Unified Ideographs", For example, I copied a Chinese word and I covered the "ABCDEFG" then enter "A B C D E F G" in the game, it will work!! Then "ABCDEFG" will change to "幼幼幼幼幼幼幼", is the game in which he Compatible "Basic Latin" ————————————Gorgeous dividing line—————————————— This in the end how to do? Let "TTF" font directly compatible with other languages ​​(Chinese)?
  2. Who can be my script as a reference, write a server rotation function? Ped and make moving?
  3. if i use "setPedAnimation" , the ped can only go in a straight line~ how to write?
  4. You mean: I have to write server function so that others can see ped move?? , But I can not write server functions, what with a few function? setPedAnimation setPedAnimationProgress setPedArmor setPedChoking setPedDoingGangDriveby setPedFightingStyle setPedFrozen setPedGravity setPedHeadless setPedOnFire setPedSkin setPedStat setPedWeaponSlot Which? function
  5. My question is: Is it just add "if setPedControlState (ped1," right ", false) then" execution, others can see ped move?
  6. I want to make a simple script. Enter the command to create ped, then I want to use "w / s / a / d" to control him, I do not know how to move ped, my "client script" using "setPedControlState", but others can not see ped move! and next is my script... client addEvent("test1",true) addEventHandler("test1",getRootElement(),function(ped1) function updateCamera ( ) local x, y, z = getElementPosition ( ped1 ) local px, py, pz = getElementPosition ( getLocalPlayer() ) setCameraMatrix ( px, py, pz+10, x, y, z ) setPedCameraRotation (ped1,getPedCameraRotation(getLocalPlayer())) end addEventHandler ( "onClientRender", getRootElement(), updateCamera ) function leftdown ( key,keyState ) rx,ry,rz=getElementRotation ( ped1 ) rz=rz+45 --setPedControlState ( ped1, "left", true ) triggerServerEvent("test3",getLocalPlayer(),keyState,rx,ry,rz) end function leftup ( key,keyState ) --if getPedControlState ( ped1,"left" )then --setPedControlState ( ped1, "left", false ) triggerServerEvent("test3",getLocalPlayer(),keyState,rx,ry,rz) --end end function rightdown ( key,keyState ) rx,ry,rz=getElementRotation ( ped1 ) rz=rz-45 --setPedControlState ( ped1, "right", true ) triggerServerEvent("test3",getLocalPlayer(),keyState,rx,ry,rz) end function rightup ( key,keyState ) --if getPedControlState ( ped1,"right" )then --setPedControlState ( ped1, "right", false ) triggerServerEvent("test3",getLocalPlayer(),keyState,rx,ry,rz) --end end function forwardsdown ( key,keyState ) rx,ry,rz=getElementRotation ( ped1 ) rz=rz --setPedControlState ( ped1, "forwards", true ) triggerServerEvent("test3",getLocalPlayer(),keyState,rx,ry,rz) end function forwardsup( key,keyState ) --if getPedControlState ( ped1,"forwards" )then --setPedControlState ( ped1, "forwards", false ) triggerServerEvent("test3",getLocalPlayer(),keyState,rx,ry,rz) --end end function backwardsdown ( key,keyState ) --setPedControlState ( ped1, "backwards", true ) triggerServerEvent("test3",getLocalPlayer(),keyState,rx,ry,rz) end function backwardsup ( key,keyState ) --if getPedControlState ( ped1,"backwards" )then --setPedControlState ( ped1, "backwards", false ) triggerServerEvent("test3",getLocalPlayer(),keyState,rx,ry,rz) --end end function jumpdown ( ) --setPedControlState ( ped1, "jump", true ) end function jumpup ( ) --if getPedControlState ( ped1,"jump" )then --setPedControlState ( ped1, "jump", false ) --end end function sprintdown ( ) --setPedControlState ( ped1, "sprint", true ) end function sprintup ( ) --if getPedControlState ( ped1,"sprint" )then --setPedControlState ( ped1, "sprint", false ) --end end function renwuboom() unbindKey("g","down",renwuboom) setTimer ( playSound, 1000, 1, "sounds/daoshu321.wav" ) setTimer ( outputChatBox, 1000, 1, "人肉炸弹倒计时3" ) setTimer ( outputChatBox, 2000, 1, "人肉炸弹倒计时2") setTimer ( outputChatBox, 3000, 1, "人肉炸弹倒计时1" ) setTimer (function() triggerServerEvent("test2",getLocalPlayer(),getElementPosition ( ped1 )) playSound("sounds/boom.mp3") removeEventHandler("onClientRender", getRootElement(), updateCamera) fadeCamera(false,1.0,255,255,0) end,4000,1) setTimer ( fadeCamera, 5000, 1, true, 0.5 ) setTimer ( function() setCameraTarget(getLocalPlayer()) unbindKey("a","down",leftdown) unbindKey("a","up",leftup) unbindKey("d","down",rightdown) unbindKey("d","up",rightup) unbindKey("w","down",forwardsdown) unbindKey("w","up",forwardsup) unbindKey("s","down",backwardsdown) unbindKey("s","up",backwardsup) unbindKey("lshift","down",jumpdown) unbindKey("lshift","up",jumpup) unbindKey("space","down",sprintdown) unbindKey("space","up",sprintup) end, 6000, 1 ) end bindKey("g","down",renwuboom) bindKey("a","down",leftdown) bindKey("a","up",leftup) bindKey("d","down",rightdown) bindKey("d","up",rightup) bindKey("w","down",forwardsdown) bindKey("w","up",forwardsup) bindKey("s","down",backwardsdown) bindKey("s","up",backwardsup) bindKey("lshift","down",jumpdown) bindKey("lshift","up",jumpup) bindKey("space","down",sprintdown) bindKey("space","up",sprintup) end ) server xianzhizhadan=0 function Createyaokongche(thePlayer) xianzhizhadan=xianzhizhadan+1 if xianzhizhadan==1 then setElementFrozen(thePlayer,true) toggleAllControls ( thePlayer,false) local x,y,z=getElementPosition(thePlayer) local rx,ry,rz = getElementRotation ( thePlayer ) ped1 = createPed(56,x,y+5,z) outputChatBox("人肉炸弹启动!WSAD控制移动,G倒数引爆",thePlayer) triggerClientEvent(thePlayer,"test1",getRootElement(),ped1) end end addCommandHandler("人肉炸弹",Createyaokongche) addEvent("test2",true) addEventHandler("test2",getRootElement(),function(x,y,z) destroyElement(ped1) createExplosion(x,y,z,0,source) setElementFrozen(source,false) setTimer(toggleAllControls ,2000,1,source,true) xianzhizhadan=0 end ) addEvent("test3",true) addEventHandler("test3",getRootElement(),function(statn,rx,ry,rz) outputChatBox("statn状态为:"..statn) if statn=="down"then local zhuanshen=setPedRotation(ped1,rz) if zhuanshen then setPedAnimation(ped1,"ped", "run_player") end end if statn=="up"then setPedRotation(ped1,rz) setPedAnimation(ped1,false) end end )
  7. you can give me The complete code yet?
  8. How to set: black screen when transmitted?
  9. function stopDamage () if getElementType(source) == "player" then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopDamage ) this ok!
  10. function stopDamage ( att ) target = getPedTarget ( att ) local typename =getElementType(target) if typename == "player" then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getRootElement(), stopDamage ) Have hurt,too!
  11. onClientPlayerDamage when i Fall down, I always death!
  12. When the player hurt myself , Then how cancel event? Was someone else kill you!
  13. ok im ok. button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true ) missionimage =guiCreateStaticImage(0, 0.05, 1, 0.9,"images/palette.png", true,button) guiSetAlpha ( missionimage, 0.5) guiSetEnabled ( missionimage, false )
  14. im ok , then my lua is function playerPressedKey(button, press) if not(press) and button=='lalt' then triggerEvent ( "uncallQ", root ) triggerEvent ( "uncallE", root ) end if (press) and button=='lalt' then triggerEvent ( "callQ", root ) triggerEvent ( "callE", root ) end end addEventHandler("onClientKey", root, playerPressedKey) and addEvent ( "callQ", true ) addEventHandler ( "callQ", root, function() bindKey ( "q", "down", bindQ ) end ) addEvent ( "uncallQ", true ) addEventHandler ( "uncallQ", root, function() unbindKey ( "q", "down", bindQ ) end ) function bindQ ( ) if ( guiGetVisible ( mission2.window[1] ) == true ) then guiSetVisible ( mission2.window[1], false ) showCursor( false ) else triggerServerEvent("checkzt",getLocalPlayer(),getLocalPlayer()) guiSetVisible ( mission2.window[1], true ) showCursor( true ) end end
×
×
  • Create New...