Jump to content

طلب كود ضرور


Recommended Posts

createMarker -- تسوي ماركر 
'onMarkerHit' -- اذا اللعب لمس الماركر 
getElementsByType -- تتحقق ان الا لمس الماركر سيارة 
isPedInVehicle -- اذا كان اللاعب في السيارة 
getElementData -- تجيب اسم القروب  
getPlayerTeam > getTeamName -- تجيب اسم التيم 
setElementPosition -- هنا تنقله الى المكان الا تبغيه 

Link to comment
marker = createMarker(...) -- نصنع ماركر 
  
addEventHandler("onClientMarkerHit" , marker ,  -- onMarkerHit إن كان هذا الكود في قسم السيرفر تستخدم 
function ()  
getElementData("team" , teamname) -- setElementData نجيب اسم الفريق من قسم السيرفر بإستخدام وظيفة  
-- ( setElementData , getElementData إن كان الكود في قسم السيرفر لاتستخدم الامرين ) 
if getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) == teamname then -- نتحقق ان اللاعب مع الفريق 
if getPedOccupiedVehicle(source) then  -- إن كان اللاعب داخل مركبة  
setElementPosition(x,y,z) -- المكان الي راح ينتقل له اللاعب 
else  
return -- إن كان اللاعب مو بمركبة ما راح ينتقل 
else  
outputChatBox("you are not with that team") -- إن كان اللاعب مو مع الفريق يطلع له كلام 
end 
end 
end )  

إن كان في خطأ ارجوا من الاخوان يوضحونه ! ^

Link to comment

marker = createMarker ( x, y, z, "cylinder", size, r, b, g, alpha ) 
local = mx, my, mz = احداثياتك  
addEventHandler( "onMarkerHit", marker, 
function ( element ) 
if getElementType ( element ) == "player" and isPedInVehicle ( element ) and getElementData ( element, "gang" ) == "اسم العصابة" and getTeamName ( getPlayerTeam ( source ) ) == "اسم التيم" then 
setElementPosition ( element, mx, my, mz ) 
end 
end 
) 
Link to comment
marker = createMarker ( x, y, z, "cylinder", size, r, b, g, alpha ) 
local = mx, my, mz = احداثياتك  
addEventHandler( "onMarkerHit", marker, 
function ( element ) 
if getElementType ( element ) == "player" and isPedInVehicle ( element ) and getElementData ( element, "gang" ) == "اسم العصابة" and getTeamName ( getPlayerTeam ( source ) ) == "اسم التيم" then 
setElementPosition ( element, mx, my, mz ) 
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...