Jump to content

iMr.3a[Z]eF

Members
  • Posts

    862
  • Joined

  • Last visited

Everything posted by iMr.3a[Z]eF

  1. أنت استخدمت هالكود؟ setTeamFriendlyFire
  2. that was usefully code thank you
  3. What function shall I use to get text inside the edit. I want the text disable only 8 Words no more I tried this. Never works local text = guiGetText(GUIEditor.edit[1]); if text > 8 then return outputChatBox("* You can just enter 8 words and numers only",255,0,0,true) end
  4. Hello everybody. I'd like to make 3D DX for one element but the code makes the DX for all elementss (Markers) Here is the original code: addEventHandler ( "onClientRender", root, function ( ) for index, p in pairs ( getElementsByType ( "marker", resourceRoot ) ) do local x, y, z = getElementPosition ( p ) local x2, y2, z2 = getElementPosition ( localPlayer ) if isLineOfSightClear ( x, y, z, x2, y2, z2, true, true, false, true ) then local sx, sy = getScreenFromWorldPosition ( x, y, z+1 ) if sx and sy then local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if distance < 30 then dxDrawText ( "Get Your Cash", sx+2, sy+2, sx, sy, tocolor(0, 0, 0, 200), 2-(distance/20), "arial", "center", "center" ) end end end end end ) And here what I tried but never works: addEventHandler ( "onClientRender", root, function ( ) local x, y, z = getElementPosition ( isElement (Enter) ) local x2, y2, z2 = getElementPosition ( localPlayer ) if isLineOfSightClear ( x, y, z, x2, y2, z2, true, true, false, true ) then local sx, sy = getScreenFromWorldPosition ( x, y, z+1 ) if sx and sy then local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if distance < 44 then dxDrawText ( "Police Station", sx+2, sy+2, sx, sy, tocolor(0, 0, 255, 255), 6-(distance/20), "default-bold", "center", "center" ) dxDrawText ( "Police Station", sx+2, sy-1, sx, sy, tocolor(255, 255, 255, 200), 6-(distance/20), "default-bold", "center", "center" ) end end end end ) The marker is: local Enter = createMarker(1555.1221923828,-1675.6265869141, 16.1953125, "corona", 1.5, 0, 0, 255, 255 )
  5. We don't accept requests, you have to do it yourself.
  6. vehicles = { [598]=true,[596]=true,[597]=true,[599]=true } team = { "gang1", "gang2", "gang3" } function v ( player, seat, jacked ) if ( vehicles[getElementModel(source)] ) and ( not team[getTeamName(player)] ) then cancelEvent() outputChatBox ( "* You're not gang men", player, 255, 0, 0 ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), v )
  7. Hello, i've created a tower for my server, I created a gate marker but, when a source hit the marker all player are teleported to the player in the marker and go inside the gate. It's client side (not full codes): addEventHandler ( "onClientMarkerHit", root, function ( ) if not isPedInVehicle ( localPlayer ) then if source == enter then setElementInterior ( localPlayer, 1 ) setElementPosition ( localPlayer, 2233.845703125, 1710.0625, 1011.0922851563 ) outputChatBox ( "* welcome to Drrb's Tower", 255, 255, 0 ) Also all markers exactly have problem like this.
  8. No, thank you i've used private way without script. SOLVED
  9. It's difference with Arabic text in nametag, iwant it Arabic.
  10. You had a mistake it line 4 it's ok 've fixed it let me try. EDIT: Doesn't works, whithout errors.
  11. No, i want each serial have a difference text in nametag
  12. ListSerial = { [1] = { 'D959022732DB64516435467F3D1BF5F4' }, -- Sojn [2] = { 'A5331B0D0A5919DBA1C19B1A278E68D4' }, -- d7om [3] = { '1715B68D93F4CDF04BAA065F5D4D14B2' }, -- Me [4] = { '2D7A67D844738FEA7562CEDBE812A3E2' } -- Mizo } addEventHandler('onResourceStart', root, function ( ) if getPlayerSerial( source ) == ListSerial[1] then setPlayerNametagText ( source, "سوجن" ) setPlayerNametagColor ( source, 255, 0, 0 ) elseif getPlayerSerial( source ) == ListSerial[2] then setPlayerNametagText ( source, "دحومي" ) setPlayerNametagColor ( source, 255, 0, 0 ) elseif getPlayerSerial( source ) == ListSerial[3] then setPlayerNametagText ( source, "عازف" ) setPlayerNametagColor ( source, 255, 0, 0 ) elseif getPlayerSerial( source ) == ListSerial[4] then setPlayerNametagText ( source, "ميزو" ) setPlayerNametagColor ( source, 255, 0, 0 ) end end) I want for those serials have a red nametag with arabic nametag too. the debug says the 'player' in getPlayerSerial() is bad pointer.
  13. Use localPlayer instead p or source marker = createMarker(1949, -1705, 13,"corona",2,0,255,0) addEventHandler("onClientMarkerHit",marker, function ( ) local vh = getPedOccupiedVehicle ( localPlayer ) if getElementModel(vh) == 462 then local nm = tonumber ( vehicles [ math.random( #vehicles ) ] ) setElementModel ( vh, nm ) end end)
  14. lol = createObject ( 987, 316.79, -1191.80, 74.90, 0, 0, 40 ) function move() if lol then moveObject ( lol, 2.5, 316.79, -1191.80, 69, 0, 0, 40 ) else moveObject ( lol, 2.5, 316.79, -1191.80, 74.90, 0, 0, 40 ) end end addCommandHandler("brama", move )
  15. There is a script in MTA calls vote or something like that, he wants to use it he don't know how to use it Now it's your turn denny to understand my language too.
  16. iMr.3a[Z]eF

    Problem !!

    My father just told me that he downloaded the Avast service, then i turned it off, at workds perfectly Also, i don't know how to allow MTA LocalServer running while Avast is running too, many thanks ccw.
  17. iMr.3a[Z]eF

    Problem !!

    http://pastebin.mtasa.com/613463951
×
×
  • Create New...