Sparrow Posted April 24, 2013 Share Posted April 24, 2013 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
S4MuEL Posted April 24, 2013 Share Posted April 24, 2013 ahhhh ! ok = )) Merci bien ! Link to comment
S4MuEL Posted April 24, 2013 Share Posted April 24, 2013 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 ! Link to comment
S4MuEL Posted April 24, 2013 Share Posted April 24, 2013 + El mas2la féha cancelEvent () ? Link to comment
Sparrow Posted April 24, 2013 Share Posted April 24, 2013 (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 April 24, 2013 by Guest Link to comment
iPrestege Posted April 24, 2013 Share Posted April 24, 2013 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
S4MuEL Posted April 24, 2013 Share Posted April 24, 2013 Merci Sparrow ! amma chouf ! famma 3béd y9olou idha el loun mta3 el function azra9 rahou server & client ! s7i7 klémhom ? Link to comment
Sparrow Posted April 24, 2013 Share Posted April 24, 2013 oui, ama cancel event mate5dm ken fel client Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now