Jump to content

Recommended Posts

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' 

Link to comment

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
Link to comment
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()

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