-
Posts
455 -
Joined
-
Last visited
Everything posted by Sex*
-
Thank you TAPL very much! Works perfect now! TY!
-
I have the same problem
-
Well now one time it really destroyed my team but sometimes not. But it doesnt create it again... The script won't do a thing by itself. EDIT: function createTeamsOnStart() MainTeam = createTeam("The Professionals", 250, 50, 0) end addEventHandler("onResourceStart", resourceRoot, createTeamsOnStart) function setTeam(_, account) local team = getAccountData(account, "team") if (team) then if not getTeamFromName(team) then MainTeam = createTeam(team, 250, 50, 0) end setPlayerTeam(source, MainTeam) end end addEventHandler("onPlayerLogin", root, setTeam) function save() local team = getPlayerTeam(source) local account = getPlayerAccount(source) if (team) and not isGuestAccount(account) then setAccountData(account, "team", getTeamName(team)) remove() end end addEventHandler("onPlayerQuit", root, save) function unassignTeam() if getPlayerTeam(source) then setPlayerTeam(source, nil) remove() end end addEventHandler("onPlayerLogout", root, unassignTeam) function remove() if (getPlayerTeam(source) == MainTeam) then if (countPlayersInTeam(MainTeam) == 0) then destroyElement(MainTeam) end end end Bad argument at line 36 "getPlayerTeam"
-
Thanks, figured it out and works great!
-
Well you had a shit server then because i have no lag(maybe very little), doesnt have problems like hostingtime... But if u want to cahnge your location from US to Germany, its pain in the ass, but if u get finally moved then its great.
-
OMFG no, i mean gamemode race, some mapper puts into his map respawn, but i have like alot of race maps that have respawn on them, so i want to make a script that disables the respawn in all of the maps(DM, DD, FUN maps).
-
So i have many maps that have in meta.xml respawn and removing them manually would be a pain in the ass, so can i override that respawn that it goes to random? Im not asking a full script, just functions for it.
-
Well now one time it really destroyed my team but sometimes not. But it doesnt create it again...
-
Ah i already made it with guiCreateStaticImage, No help needed anymore.
-
At first it was like this: g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, "Interpolation on GUI", false) Well i made this: addEventHandler("onClientRender", root, g_Window.window = dxDrawRectangle ( x/3.8, y/3.8, x/2.02, y/2, tocolor ( 0, 0, 0, 150 ) ) But doesnt work. [2013-03-31 20:27:19] WARNING: Loading script failed: deathlist\rankingBoard-Pato_c.lua:15: ')' expected (to close '(' at line 14) near '='
-
Its the old WTF radar(someone stole it), it was leaked to community but was removed from there also after some hours... So you cant have it.
-
I got it like this... function createTeamsOnStart () local MainTeam = createTeam ( "The Professionals", 250, 50,0) end addEventHandler("onResourceStart", resourceRoot, createTeamsOnStart) function setTeam() local account = getPlayerAccount(source) local team = getAccountData (account, "team") if (team) and getTeamFromName(team) then setPlayerTeam(source, getTeamFromName(team)) end end addEventHandler("onPlayerLogin",root,setTeam) function save() local team = getPlayerTeam(source) local account = getPlayerAccount(source) if (team) and not isGuestAccount(account) then setAccountData(account, "team", getTeamName(team)) end end addEventHandler("onPlayerQuit", getRootElement(), save) function unassignTeam() local theTeam = getPlayerTeam ( source ) if theTeam then setPlayerTeam ( source, nil ) end end addEventHandler("onPlayerLogout",getRootElement(), unassignTeam ) addEventHandler ( "onPlayerQuit", root, function ( ) if ( getPlayerTeam ( source ) == MainTeam ) then if ( countPlayersInTeam ( MainTeam ) == 1 ) then destroyElement ( MainTeam ) end end end ) function remove( ) if ( getPlayerTeam ( source ) == MainTeam ) then if ( countPlayersInTeam ( MainTeam ) == 1 ) then destroyElement ( MainTeam ) end end end function login() setTimer(remove,1500,1) end addEventHandler("onPlayerLogin",getRootElement(),login) function logout() setTimer(remove,1500,1) end addEventHandler("onPlayerLogout",getRootElement(),logout) addEventHandler("onPlayerQuit", getRootElement(), logout)
-
And how did you test it? It recreated the team if player from the team joined? EDIT: Tested solidsnake one and disconnected and connected again(didnt log in) but the team was still there.
-
It still doesnt work, i replaced that onPlayerQuit with onPlayerLogout because then i can test it at local server and then i can see if team gets really destroyed. addEventHandler ( "onPlayerLogout", getRootElement(), function ( ) if ( getPlayerTeam ( source ) == MainTeam ) then if ( countPlayersInTeam ( MainTeam ) == 1 ) then destroyElement ( MainTeam ) end end end )
-
But then it destroys the team if one player is in team i think?
-
MAKE IT YOURSELF! Hint: dxdrawimage onPlayerJoin setTimer
-
pain, thats not a very good solution. LuCas, that didnt work.
-
Hes not sharing the map, its only playable at my server.
-
LuCas what do you mean? Pain, now it destroys the team but it doesnt create the team then player from team joins(team gets players). And it also doesnt let me create from admin panel because the clan is deleted before(because no players in new clan).
