Chronos Posted May 6, 2013 Share Posted May 6, 2013 hello well i want create team but idk how can any one tell me how i can creat (swat team -with speacial skin )(FBI-special skin) -and SAPD also how i can creat team to my local server . Link to comment
Chronos Posted May 6, 2013 Author Share Posted May 6, 2013 Create Team: createTeam what that's i am deputan at scripting Link to comment
xXMADEXx Posted May 7, 2013 Share Posted May 7, 2013 Create Team: createTeam what that's i am deputan at scripting That is how you create the team.. Link to comment
papam77 Posted May 7, 2013 Share Posted May 7, 2013 function createDonatorsTeamOnStart () DonatorsTeam = createTeam ( "Clan Name", 0, 0, 0 )-- create a new team and named it 'Donators' end addEventHandler("onResourceStart", resourceRoot, createDonatorsTeamOnStart) -- add an event handler function setDonatorsTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Donators")) then -- if he is Donators setPlayerTeam(source, DonatorsTeam) -- set him to Donators team end end addEventHandler("onPlayerLogin",getRootElement(),setDonatorsTeam) -- add an event handler addEventHandler("onPlayerSpawn",getRootElement(),setDonatorsTeam) This is my Donators script you can use it Link to comment
Chronos Posted May 7, 2013 Author Share Posted May 7, 2013 function createDonatorsTeamOnStart () DonatorsTeam = createTeam ( "Clan Name", 0, 0, 0 )-- create a new team and named it 'Donators' end addEventHandler("onResourceStart", resourceRoot, createDonatorsTeamOnStart) -- add an event handler function setDonatorsTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Donators")) then -- if he is Donators setPlayerTeam(source, DonatorsTeam) -- set him to Donators team end end addEventHandler("onPlayerLogin",getRootElement(),setDonatorsTeam) -- add an event handler addEventHandler("onPlayerSpawn",getRootElement(),setDonatorsTeam) This is my Donators script you can use it in team.lua ?? Link to comment
papam77 Posted May 7, 2013 Share Posted May 7, 2013 function createDonatorsTeamOnStart () DonatorsTeam = createTeam ( "Clan Name", 0, 0, 0 )-- create a new team and named it 'Donators' end addEventHandler("onResourceStart", resourceRoot, createDonatorsTeamOnStart) -- add an event handler function setDonatorsTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Donators")) then -- if he is Donators setPlayerTeam(source, DonatorsTeam) -- set him to Donators team end end addEventHandler("onPlayerLogin",getRootElement(),setDonatorsTeam) -- add an event handler addEventHandler("onPlayerSpawn",getRootElement(),setDonatorsTeam) This is my Donators script you can use it in team.lua ?? you can set name which you want and it is client side Link to comment
فاّرس Posted May 7, 2013 Share Posted May 7, 2013 function createDonatorsTeamOnStart () DonatorsTeam = createTeam ( "Clan Name", 0, 0, 0 )-- create a new team and named it 'Donators' end addEventHandler("onResourceStart", resourceRoot, createDonatorsTeamOnStart) -- add an event handler function setDonatorsTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Donators")) then -- if he is Donators setPlayerTeam(source, DonatorsTeam) -- set him to Donators team end end addEventHandler("onPlayerLogin",getRootElement(),setDonatorsTeam) -- add an event handler addEventHandler("onPlayerSpawn",getRootElement(),setDonatorsTeam) This is my Donators script you can use it addEventHandler("onResourceStart", resourceRoot, function() DonatorsTeam = createTeam ( "Clan Name", 0, 0, 0 ) end) function setDonatorsTeam(player) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "GroupName" ) ) then setPlayerTeam(player, DonatorsTeam) end end addEventHandler("onPlayerLogin",getRootElement(),setDonatorsTeam) addEventHandler("onPlayerSpawn",getRootElement(),setDonatorsTeam) Link to comment
iPrestege Posted May 7, 2013 Share Posted May 7, 2013 function createDonatorsTeamOnStart () DonatorsTeam = createTeam ( "Clan Name", 0, 0, 0 )-- create a new team and named it 'Donators' end addEventHandler("onResourceStart", resourceRoot, createDonatorsTeamOnStart) -- add an event handler function setDonatorsTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Donators")) then -- if he is Donators setPlayerTeam(source, DonatorsTeam) -- set him to Donators team end end addEventHandler("onPlayerLogin",getRootElement(),setDonatorsTeam) -- add an event handler addEventHandler("onPlayerSpawn",getRootElement(),setDonatorsTeam) This is my Donators script you can use it addEventHandler("onResourceStart", resourceRoot, function() DonatorsTeam = createTeam ( "Clan Name", 0, 0, 0 ) end) function setDonatorsTeam(player) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "GroupName" ) ) then setPlayerTeam(player, DonatorsTeam) end end addEventHandler("onPlayerLogin",getRootElement(),setDonatorsTeam) addEventHandler("onPlayerSpawn",getRootElement(),setDonatorsTeam) You're code is wrong change the player to source the player is not defined. Link to comment
Chronos Posted May 7, 2013 Author Share Posted May 7, 2013 it is okey now i creat the script local marker = createMarker( 1585.7399902344, -1689.7290039063, 6.21815, "Cylinder", 1.5, 0, 69, 139, 0) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,250,"Swat") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,200,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,200,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,100,"To be a swat members, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function Swat_Team(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, Swat_Team) function Swatjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, Swatjobleave) function joinTeam() triggerServerEvent("setSwat",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeSwatWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSwatWindow, false) Link to comment
Chronos Posted May 7, 2013 Author Share Posted May 7, 2013 now i need help wuth spawner for team help here viewtopic.php?f=91&t=58797 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