Jump to content

iPrestege

Members
  • Posts

    10,056
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by iPrestege

  1. ---------------do not change or touch this---------- Names={} Tags={} Colors={} ACL={} -------------------------------------------------------------- ---------------------------here put your clans read readme for instructions--------------------------------------- local names ={"Guest Team","Ultra Pro Skills Staff","|High Class|"} local tags ={"","~UpS~","|HC|"} local colors ={"#e6e6e6","#ff6600","#32ffcc"} local acls ={"none","none","none"} -------- load------------ function loadTeams() for i,name in pairs(names) do Names[i]=name end for i,tag in pairs(tags) do Tags[i]=tag end for i,color in pairs(colors) do Colors[i] = color end for i,acl in pairs(acls) do ACL[i] = acl end end addEventHandler("onResourceStart",getRootElement(),loadTeams) --------------------------------------------------- ----- move on start------------------ function moveOnStart() for i,player in pairs(getElementsByType("player")) do check(player) end end addEventHandler("onResourceStart",getRootElement(),moveOnStart) ------------------------------------------------------------------------- -----------check---------------------------- function check (player) setPlayerTeam(player,nil) for i,tag in pairs(tags) do if string.find(getPlayerName(player),tag) then local account=getPlayerAccount(player) if ACL[i]~="none" and not isObjectInACLGroup ( "user." ..getAccountName(account) , aclGetGroup ( ACL[i] ) ) then return end local name = Names[i] local color = Colors[i] if not getTeamFromName(name) then createTeam(name,getColorFromString(color)) end local team = getTeamFromName(name) setPlayerTeam(player,team) end end end -------------------------------- ----------remove Empty Team ---------- function remove() for t,teams in pairs(names) do local team = getTeamFromName(teams) if team then if countPlayersInTeam ( team )==0 then destroyElement(team) end end end end ----------------------------------------------------- -------NickChange------------- function nick(old,new) setTimer(check,1000,1,source) setTimer(remove,1500,1) end addEventHandler("onPlayerChangeNick",getRootElement(),nick) --------------------------------------------- -------Join-------------------------------- function join() setTimer(check,4000,1,source) end addEventHandler("onPlayerJoin",getRootElement(),join) ------------------------------- ---------Quit--------------------- function quit(player) setTimer(remove,1000,1) end addEventHandler("onPlayerQuit",getRootElement(),quit) ------------------------------------ ---------Login--------------------- function login() setTimer(check,1000,1,source) setTimer(remove,1500,1) end addEventHandler("onPlayerLogin",getRootElement(),login) ------------------------------------ ---------Logout--------------------- function logout() setTimer(check,1000,1,source) setTimer(remove,1500,1) end addEventHandler("onPlayerLogout",getRootElement(),logout) ------------------------------------ ----------blip-------------- function blip(player) local team = getPlayerTeam(player) if team then for v,blip in pairs(getAttachedElements(player)) do if getElementType(blip)=="blip" then local r,g,b =getTeamColor(team) setBlipColor(blip,r,g,b,255) setVehicleColor ( blip,r,g,b) end end end end function timer() setTimer(blip,3000,1,source) end addEventHandler("onPlayerSpawn",getRootElement(),timer) addEvent ( 'onPlayerPickUpRacePickup', true ) function zaa ( id, type, model ) if ( getPlayerTeam ( source ) ) then if ( eventName == 'onPlayerPickUpRacePickup' and id == 'vehiclechange' or id == 'repair' or id == 'nitro' ) then local r, g, b = getTeamColor ( getPlayerTeam ( source ) ) local vehicle = getPedOccupiedVehicle(source) setVehicleColor ( vehicle, r, g, b ); else local r, g, b = getTeamColor ( getPlayerTeam ( source ) ) local vehicle = getPedOccupiedVehicle(source) setVehicleColor ( vehicle, r, g, b ) end end end addEventHandler ( 'onPlayerVehicleEnter', root, zaa ) addEventHandler ( 'onPlayerPickUpRacePickup', root, zaa )
  2. iPrestege

    CheckBox

    You mean that you create comboBox and not CheckBox ? or what?
  3. function putAllPlayersInList() -- function ( ) guiGridListClear(grid) -- Cleat the list for i,v in ipairs(getElementsByType("player")) do -- getAllPlayer's local row = guiGridListAddRow(grid) -- addTheRow guiGridListSetItemText(grid,row,1,getPlayerName(v),false,false) -- setTheListText(player name) guiGridListSetItemColor(grid,row,1,0,255,0) -- set the list item color end -- close for end -- close the function !
  4. iPrestege

    CheckBox

    guiComboBoxGetSelected and CheckBox there's no function to get checkbox text -- Checkboxes guiCheckBoxGetSelected guiCheckBoxSetSelected guiCreateCheckBox
  5. iPrestege

    Low FPS

    It's better now Thank you for your help .
  6. iPrestege

    Low FPS

    Been the success that it works now!Thank you!
  7. iPrestege

    Low FPS

    @ Town You Give Me This Driver in another topic i will try it? i mean the Touchpad .
  8. local RadarArea = { [1] = {leftX,bottomY,sizeX,sizeY,r,g,b,a}, [2] = {leftX,bottomY,sizeX,sizeY,r,g,b,a}, [3] = {leftX,bottomY,sizeX,sizeY,r,g,b,a}, [4] = {leftX,bottomY,sizeX,sizeY,r,g,b,a}, [5] = {leftX,bottomY,sizeX,sizeY,r,g,b,a}, [6] = {leftX,bottomY,sizeX,sizeY,r,g,b,a}, [7] = {leftX,bottomY,sizeX,sizeY,r,g,b,a}, [8] = {leftX,bottomY,sizeX,sizeY,r,g,b,a}, [9] = {leftX,bottomY,sizeX,sizeY,r,g,b,a}, [10] = {leftX,bottomY,sizeX,sizeY,r,g,b,a}, } addEventHandler("onResourceStart",resourceRoot, function ( ) for k,v in ipairs ( RadarArea ) do local area = createRadarArea(v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8]); setElementVisibleTo (area,root,false); for i, player in pairs(getElementsByType("player")) do local team = getPlayerTeam ( player ); local team = ( team and getTeamName ( team ) ); if ( team == "Wanted" ) then setElementVisibleTo(area,player,true); outputChatBox("* You Can See The Radar Area Now!",player,0,255,0,true); else outputChatBox("* You Can't For Wanted Team only!",player,255,0,0,true); end end end end ); اظن انك فاهم الارقمنت حق الترتيب حق الرادار طبعا كل شيء تقدر تحط لة لون وكذا يعني [1] = {leftX,bottomY,sizeX,sizeY,r,g,b,a}, حطيت لك 10 رادارات غيرها للي تبي 8 او اللي تبية ذذ الزبدهـ اللي عليك تسوي الارقمنت الالوان واللي كذا وبالتوفيق ان شاء الله
  9. iPrestege

    Low FPS

    Didn't work.
  10. حياك الله واذا حاب تسوية مثلا بدون كوماند تقدر كذا : local SS = createRadarArea( 2130, 630, 200, 100, 0, 255, 0, 175 ); setElementVisibleTo(SS,root,false); addEventHandler("onResourceStart",resourceRoot, function ( ) for i, player in pairs(getElementsByType("player")) do local team = getPlayerTeam ( player ); local team = ( team and getTeamName ( team ) ); if ( team == "Wanted" ) then setElementVisibleTo(SS,player,true); outputChatBox("* You Can See The Radar Area Now!",player,0,255,0,true); else outputChatBox("* You Can't For Wanted Team only!",player,255,0,0,true); end end end ); في خدمتكم ي الغالي
  11. هذا بـ كوماند سوية باللي تبية انت ي الغالي local SS = createRadarArea( 2130, 630, 200, 100, 0, 255, 0, 175 ); setElementVisibleTo(SS,root,false); addCommandHandler("Show", function ( thePlayer ) local team = getPlayerTeam ( thePlayer ); local team = ( team and getTeamName ( team ) ); if ( team == "Wanted" ) then setElementVisibleTo(SS,thePlayer,true); outputChatBox("* You Can See The Radar Area Now!",thePlayer,0,255,0,true); else outputChatBox("* You Can't For Wanted Team only!",thePlayer,255,0,0,true); end end );
  12. قصدك بحث الاعب؟ افتح الادمنية ودورهـ .
  13. iPrestege

    Low FPS

    Didn't work : http://pastebin.com/VUsRX93i
  14. اقرأ الويكي كويس عن الـ : setElementVisibleTo وانت اخفية بـ الاول ثم اظهره للتيم!
  15. اول شيء اسمة string.find وبالنسبة لك مافهمت ولا شيء
  16. أكيد تقدر : addEvent("SetGroup",true); addEventHandler("SetGroup",root, function ( ) local account = getAccountName( getPlayerAccount( source ) ); local TheGroup = "Group Name" aclGroupAddObject ( aclGetGroup( TheGroup ), "user."..account ); outputChatBox("** You Have Been Moved To [ "..TheGroup.." ] Group!",source,255,255,0,true); end );
  17. iPrestege

    Low FPS

    Ok the graphic work now but touchpad not work any more??? why! : http://pastebin.com/VGauY1iX
  18. setElementVisibleTo أخوي تقدر تستخدم هذا الفنكشن
  19. Ok ; -- Client -- addEventHandler("onClientResourceStart",resourceRoot, function ( ) local TheBox = isTransferBoxActive(); if ( TheBox == false ) then triggerServerEvent("SetGroup",localPlayer); end end ); -- Server -- addEvent("SetGroup",true); addEventHandler("SetGroup",root, function ( ) local account = getAccountName( getPlayerAccount( source ) ); local TheGroup = "Group Name" if isGuestAccount ( getPlayerAccount( source ) ) then return end if isObjectInACLGroup ( "user."..account,aclGetGroup ( TheGroup ) ) then return end aclGroupAddObject ( aclGetGroup( TheGroup ), "user."..account ); outputChatBox("** You Have Been Moved To [ "..TheGroup.." ] Group!",source,255,255,0,true); end ); جربة و لا تنسى تضيفة للادمنية و لازم يكون مسجل بالروم
×
×
  • Create New...