Jump to content

طلب فنكشنات


Recommended Posts

onResourceStart اخر شي حدث

يصير كذا :

addEventHandler ( "onResourceStart", resourceRoot, function (   ) 
  setTimer( function(  ) 
     outputChatBox("The Mission Started|بدأت مهمة الاست مان اشارة الرجل الاصفر فالخريطة",root,250,0,0) 
   end,1200000,1) 
end ) 
Link to comment
  • Replies 88
  • Created
  • Last Reply

Top Posters In This Topic

if getElementType(player) == "player" and not isPedInVehicle(player) then
addEventHandler("onMarkerHit",Marker, 
setTimer(function() 
if getElementType(player) == "player" and not isPedInVehicle(player) then 
setElementFrozen(player) 
end,120000,1) 
end) 

؟؟

addEventHandler("onMarkerHit", Marker, 
function(player) 
setTimer(function() 
if getElementType(player) == "player" and not isPedInVehicle(player) then 
setElementFrozen(player) 
end,120000,1) 
end) 
Link to comment

ERROR: Loading script failed: mission\client.lua:26: unexpected symbol near ','

  
text = { 
{"x[Mission Last Man]x",2226.61743,1839.42468,10.82031, -- x,y,z pos 
255,0,255},-- r,g,b color 
}   
addEventHandler ( "onClientRender", root, 
function (v) 
for _,v in ipairs (text) do 
local x,y,z = getElementPosition ( localPlayer ) 
if ( getDistanceBetweenPoints3D (v[2],v[3],v[4], x,y,z ) ) < 50 then 
local pos = { getScreenFromWorldPosition ( v[2],v[3],v[4]) } 
if (isLineOfSightClear (v[2],v[3],v[4], x,y,z, true, true, false, true)) then 
if pos[1] and pos[2] then 
dxDrawText (v[1], pos[1],pos[2],pos[1],pos[2], tocolor(v[5],v[6],v[7]), 2, "default-bold" ) 
end 
end 
end 
end 
end) 
  
  
addEventHandler("onMarkerHit", Marker, 
function(player) 
setTimer(function() 
if getElementType(player) == "player" and not isPedInVehicle(player) then 
setElementFrozen(player) 
end,120000,1) 
end) 
  
  
  

والاعب ما يتجمد عند دخول الماركر

Link to comment

مشكلة جديدة

وهي عند دخول الاعب للتيم يعطيه فلوس

بسبب كود يتحقق لو يوجد لاعب 1 بالتيم يعطيه فلوس

:(

ابيه بعد الانتقال للمهمة ومرور 3 دقيقة يبدأ تحقق

--server 
Timer = setTimer ( function (   ) 
for i,v in ipairs ( getPlayersInTeam(getTeamFromName('Mission')) ) do 
if ( #getPlayersInTeam ( getTeamFromName('Mission') ) <= 1 ) then 
givePlayerMoney ( v , 50000 ) 
setElementPosition(source ,2202.63672,1846.17018,10.82031) 
setElementInterior(source,15) 
killTimer ( Timer ) 
end 
end 
end,5000,0) 

++

++

++

الاعب ما يتجمد عند دخوله للمهمة

  
--server 
addEventHandler("onMarkerHit", Marker, 
function(player) 
setTimer(function() 
if getElementType(player) == "player" and not isPedInVehicle(player) then 
setElementFrozen(player) 
end 
end,120000,1) 
end) 

Link to comment

الطلب الاول

addEventHandler("onMarkerHit", Marker, 
function(player) 
setTimer(function() 
if getElementType(player) == "player" and not isPedInVehicle(player) then 
setElementFrozen(player,true) 
end 
end,120000,1) 
end) 

بالنسبه للطلب الثاني

function theTimer() 
Ron = setTimer(theTimer2,5000,0) 
end 
  
function theTimer2() 
for i,v in ipairs ( getPlayersInTeam(getTeamFromName('Mission')) ) do 
if ( #getPlayersInTeam ( getTeamFromName('Mission') ) == 1 ) then 
givePlayerMoney ( v , 50000 ) 
setElementPosition(v,2202.63672,1846.17018,10.82031) 
setElementInterior(v,15) 
killTimer ( Timer ) 
end 
end 
end 

بتسوي عند الدخول للمهمه بـ3 دقائق يبدا يتحقق

ضيف الكود ذا

PlayerTimer = setTimer(theTimer,3*60000,1) 

حاول وبساعدك

+

كان عندك خطأ بالـ

setElementPosition + setElementInterior

حاطت الارقمنت source

Link to comment

ابي عند الفوز بالمهمة يرجعه للعالم الطبيعي

setTimer ( function ( ) 
for k,v in ipairs (getElementsByType("player")) do 
if ( getElementInterior ( v ) == 15 ) then 
setElementPosition(v,2202.63672,1846.10718,10.82031) 
outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) 
       end 
    end 
end,600000,1) 
  

ابيه يرجع لinteriot 0

Link to comment
ابي عند الفوز بالمهمة يرجعه للعالم الطبيعي
setTimer ( function ( ) 
for k,v in ipairs (getElementsByType("player")) do 
if ( getElementInterior ( v ) == 15 ) then 
setElementPosition(v,2202.63672,1846.10718,10.82031) 
outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) 
       end 
    end 
end,600000,1) 
  

ابيه يرجع لinteriot 0

setTimer ( function ( ) 
for k,v in ipairs (getElementsByType("player")) do 
if ( getElementInterior ( v ) == 15 ) then 
setElementInterior(v, 0) 
setElementPosition(v,2202.63672,1846.10718,10.82031) 
outputChatBox("The Mission End|المهمة انتهت",v,250,255,0) 
       end 
    end 
end,600000,1) 
  
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...