-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Post your code.
-
My bad, I forgot to rename the function, copy the code again, it works ( tested ).
-
setPedAnimation function has an argument which is "loop", set it to "false".
-
Do you have the file in your resource? make sure the path is correct and it has been added to the meta.xml. Also, make sure the script is set as client side in the meta.xml.
-
Why don't you stop posting the same thing that another user already said?
-
Explain about server, only the video is not enough. Tell the resources/scripts that are added to the server. And some more deatils+IP Adress. Dont you think the link of Youtube is wrong?, you wrote it Correct One: http://youtube.com/jpxIkAICoFo This isn't a server advertisement, as you can see, it's under the "Media" section, so please think before replying. Also, his link is correct, yours is wrong.
-
Well, you posted a client side script which uses a server side script that you don't have claiming it's yours. To my eyes, that's a stolen script. Topic locked.
-
Even if that's true, he forgot to give you the server side script. So, after your "friend" gets back from holidays, ask him for the server side script.
-
Who created that script? because you obviously didn't.
-
No, post the server side script.
-
Post the server side script.
-
Why is not working? what's the problem?
-
You're welcome.
-
The colshape uses same position as the gate, if it's still too high, change that "z - 1" to "z - 2" or more.
-
-- team, object model, position and rotation, move to position local gates = { { "Desert Eagles", 980, { 110.299, 1756.400, 19.399, 0, 0, 90 }, { 110.299, 1756.400, 25.5 } }, { "Desert Eagles", 980, { 290.700, 1821.099, 19.399, 0, 0, 89.999 }, { 290.700, 1821.099, 25.5 } } } There you add/remove/change gates.
-
I guess that the uploader stole that script.
-
addEventHandler ( "onPlayerWasted", root, function ( totalAmmo, killer, killerWeapon, bodypart, stealth ) if ( killer ) then local account = getPlayerAccount ( killer ) if ( killer ~= source ) then setAccountData ( account, "killsdeathsratio.Kills", tonumber ( getAccountData ( account,"killdeathsratio.Kills" ) or 0 ) + 1 ) setElementData ( killer, "Kills", tonumber ( getAccountData ( account,"killsdeathsratio.Kills" ) ) ) setElementData ( killer, "Ratio", tonumber ( ( getElementData ( killer, "Kills" ) or 0 ) / ( getElementData ( source, "Deaths" ) or 0 ) ) ) end else local accountSource = getPlayerAccount ( source ) setAccountData ( accountSource, "killsdeathsratio.Deaths", tonumber ( getAccountData ( accountSource, "killsdeathsratio.Deaths" ) or 0 ) + 1 ) setElementData ( source, "Deaths", tonumber ( getAccountData ( accountSource, "killsdeathsratio.Deaths" ) ) ) setElementData ( source, "Ratio", ( getElementData ( source, "Kills" ) or 0 ) / ( getElementData ( source, "Deaths" ) or 0 ) ) end end ) addEventHandler ( "onPlayerLogin", root, function ( thePreviousAccount, theCurrentAccount, autoLogin ) local account = getPlayerAccount ( source ) if ( not getAccountData ( account, "killsdeathsratio.Kills" ) and not getAccountData ( account, "killsdeathsratio.Deaths" ) ) then setAccountData ( account,"killsdeathsratio.Kills", 0 ) setAccountData ( account,"killsdeathsratio.Deaths", 0 ) end setElementData ( source, "Deaths",tonumber ( getAccountData ( account, "killsdeathsratio.Deaths" ) or 0 ) ) setElementData ( source, "Kills",tonumber ( getAccountData ( account, "killsdeathsratio.Kills" ) or 0 ) ) setElementData ( source, "Ratio", ( getElementData ( source, "Kills" ) or 0 ) / ( getElementData ( source, "Deaths" ) or 0 ) ) end ) addEventHandler( "onResourceStart",resourceRoot, function( ) outputDebugString( "add Total Kills to scoreboard Return: "..tostring( call( getResourceFromName("Scoreboard"), "addScoreboardColumn", "Kills",root,5, 0.070 ) ) ) outputDebugString( "add Total Kills to scoreboard Return: "..tostring( call( getResourceFromName("Scoreboard"), "addScoreboardColumn", "Deaths",root,5, 0.070 ) ) ) outputDebugString( "add Ratio to scoreboard Return: "..tostring( call( getResourceFromName("Scoreboard"), "addScoreboardColumn", "Ratio",root,5, 0.070 ) ) ) end )
-
-- team, object model, position and rotation, move to position local gates = { { "Desert Eagles", 980, { 110.299, 1756.400, 19.399, 0, 0, 90 }, { 110.299, 1756.400, 25.5 } }, { "Desert Eagles", 980, { 290.700, 1821.099, 19.399, 0, 0, 89.999 }, { 290.700, 1821.099, 25.5 } } } local gateData = { } -- A table to store the gates data addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, data in ipairs ( gates ) do -- Loop our gates table local team, model, posRot, moveTo = unpack ( data ) -- Unpack the gate data local x, y, z, rx, ry, rz = unpack ( posRot ) -- Unpack the gate position and rotation local mx, my, mz = unpack ( moveTo ) -- Unpack the position to where it has to move local object = createObject ( model, x, y, z, rx, ry, rz ) -- Create the gate object local colshape = createColTube ( x, y, z - 0.5, 20, 3 ) -- Create the gate colshape if ( colshape ) then -- If the colshape was created addEventHandler ( "onColShapeHit", colshape, onGateColshape ) -- Add the event handler for when hit the colshape addEventHandler ( "onColShapeLeave", colshape, onGateColshape ) -- Add the event handler for when leave the colshape gateData [ colshape ] = -- Use the colshape as index to store the gate data { object = object, team = team, x = x, y = y, z = z, mx = mx, my = my, mz = mz } end end end ) function onGateColshape ( hitElement, matchD ) if ( matchD ) then -- If the dimension matches local data = gateData [ source ] -- Get the gate data using the colshape as index ( source ) if ( data ) then -- If there was data local team = getPlayerTeam ( hitElement ) -- Get the player team local teamName = ( team and getTeamName ( team ) or "" ) -- Get the team name if ( teamName == data.team ) then -- If the player team matches the gate team if ( eventName == "onColShapeHit" ) then -- If the event name is 'onColShapeHit' moveObject ( data.object, 2200, data.mx, data.my, data.mz ) -- Open the gate else -- If the event name is 'onColShapeLeave' moveObject ( data.object, 2200, data.x, data.y, data.z ) -- Close the gate end end end end end I added comments so you know what each line does.
-
You mean a count down? you can create a timer to decrease a variable every second or so.
-
Maybe the thing is that you stole that script and you want our help to build the server side.
-
That error means that it triggered a server side event which doesn't exist in the server side.
-
No habia nada que entender, lo unico que dije es que el codigo que vos pusiste ahi solo es para crear una columna en la scoreboard.