Jump to content

Recommended Posts

Posted

r4ybak, ashl exemple:

function getMyGroupName() 
local group = getElementData(source, "Group") -- te5ou esm el group mta3 el player 
if (group == "") then 
outputChatBox("You are not in group!", source, 255, 0, 0) 
elseif (group ~= "") then 
outputChatBox("Your group name is: "..group, source, 0, 255, 0) 
end 
end 
addCommandHandler("myGroup", getMyGroupName) 
  

el 'setElementData' t7ot 7aja lel player/vehicle/object

setElementData(player, "Group", "GroupName") -- t7ot esm el group lel player 'groupName' 

Posted

béllehi Sparraw ، tnajjamchi ta3malli code

idha ena mathalan fi Team ismou Police

innajjem nerkeb karhba el id mté3ha 411

w idha ken menich fil team mta3 el Police mannajamech ! :wink:

Posted (edited)

cancelEvent techi ken client side.

function allowedPoliceVehicleEnter(player, seat) 
local id = getElementModel(source) 
if (id == 411) and (seat == 0) and not(getTeamName(getPlayerTeam(player)) == "Police") then 
outputChatBox("Only pollice officers allowed to enter this vehicle!", player, 255, 0, 0) 
cancelEvent() 
end 
end 
addEventHandler("onClientVehicleStartEnter", root, allowedPoliceVehicleEnter) 

Edited by Guest
Posted
cancelEvent techi ken client side.
function allowedPoliceVehicleEnter(player, seat) 
local id = getElementModel(source) 
if (id == 411) and (seat == 0) and not(getTeamName(getPlayerTeam(player)) == "Police") then 
outputChatBox("Only pollice officers allowed to enter this vehicle!", player, 255, 0, 0) 
cancenEvent() 
end 
end 
addEventHandler("onClientVehicleStartEnter", root, allowedPoliceVehicleEnter) 

cancenEvent() > cancelEvent()

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...