Jump to content

السلام عليكم ابى تعديل على كود


Recommended Posts

function cam () 
 setCameraMatrix(source, 214.28958129883+math.random(1,5), 1865.3023681641+math.random(5,9), 13.140625, 180, 285, 0, 0) 
 ped = createPed ( 210.10000610352, 1874.1999511719, 13.10000038147 ) 
 setPedAnimation( ped, "ped", "WOMAN_walknorm") 
    end 
addEventHandler ("onResourceStart",root,cam) 
  
  
addEventHandler("onClientRender", getRootElement(),  
function() 
    local x, y, z = getElementPosition(ped) 
    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.3) 
     if(sx) and (sy) then 
      local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) 
      if(distance < 30) then 
       dxDrawText("اهلا و سهلا", sx+2, sy+2, sx, sy, tocolor(0,0,0), 6.3-(distance/20), "arial", "center", "center") 
       dxDrawText("اهلا و سهلا", sx, sy, sx, sy, tocolor(255,255,255), 6-(distance/20), "arial", "center", "center") 
   end 
  end 
 end 
end) 
  

حطيت كل شى والاحداثيات و ماشتغل ولا الشخص تحرك ابى حل :(

Link to comment

function cam () 
 setCameraMatrix(214.28958129883+math.random(1,5), 1865.3023681641+math.random(5,9), 13.140625, 180, 285, 0, 0) 
 ped = createPed (0, 210.10000610352, 1874.1999511719, 13.10000038147 ) 
 setPedAnimation( ped, "ped", "WOMAN_walknorm") 
end 
addEventHandler ("onClientResourceStart",resourceRoot,cam) 
  
  
addEventHandler("onClientRender", getRootElement(), 
function() 
    local x, y, z = getElementPosition(ped) 
    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.3) 
     if(sx) and (sy) then 
      local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) 
      if(distance < 30) then 
       dxDrawText("اهلا و سهلا", sx+2, sy+2, sx, sy, tocolor(0,0,0), 6.3-(distance/20), "arial", "center", "center") 
       dxDrawText("اهلا و سهلا", sx, sy, sx, sy, tocolor(255,255,255), 6-(distance/20), "arial", "center", "center") 
   end 
  end 
 end 
end) 

اخطائك

setCameraMatrix : حاط ارقمنت الاعب الخاص بالسيرفر - يعني لاتحط الارقمنت بالكلنت

createPed : نسيت ان تضع ارقمنت رقم الشخصية

addEventHandler :

1 - لتجعله بالكلنت onClientResourceStart وهو خاص بالسيرفر ضع onResourceStart حاط اسم الافنت

2 - لتجعله اذا اشتغل المود الحالي resourceRoot يعني اي مود يشتغل يسوي شخصية جديدة - حطroot حاط

Link to comment

غيرت ولا الكلام ظهر ولا الشخصية

function cam () 
 setCameraMatrix(214.28958129883+math.random(1,5), 1865.3023681641+math.random(5,9), 13.140625, 180, 285, 0, 0) 
 ped = createPed (214.10000610352, 1875.9000244141, 13.10000038147) 
 setPedAnimation( ped, "46", "Bat_1") 
end 
addEventHandler ("onClientResourceStart",resourceRoot,cam) 
  
  
addEventHandler("onClientRender", getRootElement(), 
function() 
    local x, y, z = getElementPosition(ped) 
    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.3) 
     if(sx) and (sy) then 
      local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) 
      if(distance < 30) then 
       dxDrawText("سيرفر نجوم يرحب بكم", sx+2, sy+2, sx, sy, tocolor(255,255,255), 6.3-(distance/20), "arial", "center", "center") 
       dxDrawText("سيرفر نجوم يرحب بكم", sx, sy, sx, sy, tocolor(255,255,255), 6-(distance/20), "arial", "center", "center") 
   end 
  end 
 end 
end) 

Link to comment
function cam () 
 setCameraMatrix(214.28958129883+math.random(1,5), 1865.3023681641+math.random(5,9), 13.140625, 180, 285, 0, 0) 
 ped = createPed (0, 214.10000610352, 1875.9000244141, 13.10000038147 ) 
 setPedAnimation( Dark Romeo, "46", "WOMAN_walknorm") 
end 
addEventHandler ("onClientResourceStart",resourceRoot,cam) 
  
  
addEventHandler("onClientRender", getRootElement(), 
function() 
    local x, y, z = getElementPosition(ped) 
    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.3) 
     if(sx) and (sy) then 
      local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) 
      if(distance < 30) then 
       dxDrawText("سيرفر نجوم يرحب بكم", sx+2, sy+2, sx, sy, tocolor(0,0,0), 6.3-(distance/20), "arial", "center", "center") 
       dxDrawText("سيرفر نجوم يرحب بكم", sx, sy, sx, sy, tocolor(255,255,0), 6-(distance/20), "arial", "center", "center") 
   end 
  end 
 end 
end) 

شوف يمكن فى غلظه

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...