Jump to content

manve1

Retired Staff
  • Posts

    1,283
  • Joined

  • Last visited

Everything posted by manve1

  1. manve1

    [HELP3x]Chat

    by 'top chat' what do you mean?
  2. You can, by using power of scripting.
  3. manve1

    help

    addEventHandler('onPlayerWasted', getRootElement(), function( thePlayer ) skin = getElementModel( thePlayer ) setElementData( thePlayer, 'skin-save', skin ) end ) addEventHandler('onPlayerSpawn', getRootElement(), function( thePlayer ) setElementModel( thePlayer, getElementData( thePlayer, 'skin-save' ) ) end )
  4. manve1

    Help.

    it didn't work. No animation and nothing given to person who hit it
  5. manve1

    Help.

    no everything looks fine, 1 trigger, 1 event, 1 event handler
  6. You posted 2nd post and saying ur not new? Lol, go make jokes somewhere else ''KID''
  7. Aye you little piece of shat, upload your virus elsewhere. NB: Your virus is sooo 2008 Your a new poster and you complain about something that isn't a virus? I tried it, it worked on my computer, but it's not finished I guess
  8. manve1

    Help.

    Well, it repeats the script which gives player: money, ammo and weapon for as much time's as there is people online. P.S. This is only a short piece which should have the bug
  9. manve1

    Help.

    I have a simple problem, the script outputs 4 messages instead of 2 and gives the player twice as much of stuff then he should get Client: addEvent('anims', true) addEventHandler('anims', getRootElement(), function( ) if isElement(localPlayer) then setPedAnimation( localPlayer, 'CARRY', 'liftup' ) triggerServerEvent('weapons"n"money', localPlayer) else return false end end ) addEvent('anims2', true) addEventHandler('anims2', getRootElement(), function( ) if isElement(localPlayer) then setPedAnimation( localPlayer, false ) else return false end end ) Server: addEventHandler('onColShapeHit', col1, function( hitElement ) setTimer( function( ) triggerClientEvent('anims', hitElement, hitElement) if isElement(col1) then destroyElement( col1 ) end setTimer( function( ) triggerClientEvent('anims2', hitElement, hitElement) if isElement( box1 ) then destroyElement( box1 ) end end, 1500, 1 ) end, 50, 1 ) end ) -- addEventHandler('onColShapeHit', col2, function( hitElement ) setTimer( function( ) triggerClientEvent('anims', hitElement, hitElement) if isElement(col2) then destroyElement( col2 ) end setTimer( function( ) triggerClientEvent('anims2', hitElement, hitElement) if isElement( box2 ) then destroyElement( box2 ) end end, 1500, 1 ) end, 50, 1 ) end ) addEvent('weapons"n"money', true) addEventHandler('weapons"n"money', getRootElement(), function() local money = math.random( 10, 30000 ) local weapon = math.random( 1, 35 ) local ammo = math.random( 1, 1000 ) giveWeapon( source, weapon, ammo ) givePlayerMoney( source, money ) if (weapon == 1) then outputChatBox( '#FF0000Santa: #FFFFFFYou got '.. money ..'$ and Brassknucles.', source, 255, 255, 255, true ) outputChatBox( '#FF0000Santa: #FFFFFF'.. getPlayerName( source ) ..' Found a Christmas Present and got: '.. money ..'$ and Brassknucles.', root, 255, 255, 255, true ) elseif (weapon == 2) then outputChatBox( '#FF0000Santa: #FFFFFF'.. getPlayerName( source ) ..' Found a Christmas Present and got: '.. money ..'$ and Golf club.', root, 255, 255, 255, true ) outputChatBox( '#FF0000Santa: #FFFFFFYou got '.. money ..'$, Golf Club.', source, 255, 255, 255, true ) elseif (weapon == 3) then outputChatBox( '#FF0000Santa: #FFFFFFYou got '.. money ..'$, Nightstick.', source, 255, 255, 255, true ) outputChatBox( '#FF0000Santa: #FFFFFF'.. getPlayerName( source ) ..' Found a Christmas Present and got: '.. money ..'$ and NightStick.', root, 255, 255, 255, true ) elseif (weapon == 4) then outputChatBox( '#FF0000Santa: #FFFFFFYou got '.. money ..'$, Knife.', source, 255, 255, 255, true ) outputChatBox( '#FF0000Santa: #FFFFFF'.. getPlayerName( source ) ..' Found a Christmas Present and got: '.. money ..'$ and Knife.', root, 255, 255, 255, true ) end end ) NOTE: everything is defined
  10. well, you need to re-script it then, because i found lots of bugs with those 2 label's, i removed them and ur script worked for me.
  11. No point having event handler for the resource start, it saves when player quit's and gives back stuff when he comes back
  12. No, triggering isn't that .... And it wouldn't work if you done this. Read the tutorial i posted: viewtopic.php?f=148&t=51192
  13. Try without the labels: lblx and x7x, it worked for me without them.
  14. trigger it to server side and back
  15. local lblx = guiCreateLabel(853, 306, 478, 39, "", false) guiSetVisible(lblx,false) guiSetFont(lblx, guiCreateFont("Other/TD[M]ER.ttf", 10)) guiSetProperty(lblx, "Disabled", "True") GUIEditor = { label = {}, button = {}, } local gangWnd = guiCreateStaticImage(0, 0, 1, 1, "img/P.png", true) guiSetAlpha(gangWnd, 1) local mainBackgroundLabel = guiCreateLabel ( 50, 0, 400, 100, '', false, gangWnd ) guiSetEnabled ( mainBackgroundLabel, false ) guiSetVisible(gangWnd, false) showCursor ( false ) stop = guiCreateButton(54, 388, 98, 31, "•| stop sound |•", false, gangWnd) guiSetFont(stop, "default-bold-small") guiSetProperty(stop, "NormalTextColour", "FFE0DD1E") GUIEditor.label[1] = guiCreateLabel(20, 447, 279, 28, "• Created By TD[M]ER V2.1 •", false, gangWnd) guiLabelSetColor(GUIEditor.label[1], 249, 4, 4) local x7x = guiCreateLabel(357, 429, 327, 33, "© Welcome To Server 6AraT ©", false, gangWnd) guiSetFont(x7x, guiCreateFont("Other/TD[M]ER.ttf", 10)) Grove = guiCreateStaticImage(44, 30, 121, 301, "img/Grove.png", false, gangWnd) Ballas = guiCreateStaticImage(374, 30, 121, 302, "img/Ballas.png", false, gangWnd) Aztecas = guiCreateStaticImage(210, 30, 121, 300, "img/Aztecas.png", false, gangWnd) NoTeam = guiCreateStaticImage(538, 30, 124, 304, "img/NoTeam.png", false, gangWnd) GUIEditor.label[3] = guiCreateLabel(64, 341, 93, 21, " § Grove §", false, gangWnd) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.label[4] = guiCreateLabel(220, 341, 93, 21, " § Aztecas §", false, gangWnd) guiSetFont(GUIEditor.label[4], "default-bold-small") GUIEditor.label[5] = guiCreateLabel(403, 343, 71, 25, " § Ballas §", false, gangWnd) guiSetFont(GUIEditor.label[5], "default-bold-small") GUIEditor.label[6] = guiCreateLabel(564, 342, 71, 25, " § NoTeam §", false, gangWnd) guiSetFont(GUIEditor.label[6], "default-bold-small") function color ( ) guiLabelSetColor ( x7x, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) guiLabelSetColor ( lblx, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end setTimer ( color, 200, 0 ) ---------------------------------------- function onGuiClick (button, state, absoluteX, absoluteY) local ip = getLocalPlayer() if source == GUIEditor.label[5] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundN ) stopSound( soundA ) setElementPosition(ip, 214.03983, 1864.13306, 13.14063) soundB = playSound("Other/War.mp3", false) triggerServerEvent("setBallasTeam",getLocalPlayer()) outputChatBox ("you're joining to Ballas war", source, getRootElement(),255,0,0,true) guiSetVisible(lblx,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Ballas War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == GUIEditor.label[3] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundB ) stopSound( soundN ) stopSound( soundA ) setElementPosition(ip, 2498.7, -1680.3, 13.3) soundG = playSound("Other/War.mp3", false) triggerServerEvent("setGroveTeam",getLocalPlayer()) outputChatBox ("you're joining to Grove war", source, getRootElement(),255,0,0,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Grove War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == GUIEditor.label[4] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundN ) setElementPosition(ip, 1569.68652, -1019.28009, 23.91405) showCursor ( false ) soundA = playSound("Other/War.mp3", false) triggerServerEvent("setAztecasTeam",getLocalPlayer()) outputChatBox ("you're joining to Aztecas war", source, getRootElement(),255,0,0,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Aztecas War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == GUIEditor.label[6] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundA ) soundN = playSound("Other/War.mp3", false) triggerServerEvent("setNoTeam",getLocalPlayer()) outputChatBox ("you're joining to NoTeam", source, getRootElement(),255,0,0,true) showCursor ( false ) elseif source == stop then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundN ) stopSound( soundA ) outputChatBox ("sound was stoped", source, getRootElement(),255,0,0,true) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) bindKey ( "F7" , "down" , function() if ( guiGetVisible ( gangWnd ) == true ) then guiSetVisible ( gangWnd ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( gangWnd ) == false ) then guiSetVisible ( gangWnd ,true ) showCursor (true ) guiSetInputEnabled(true) end end ) I had to re-make some of it because you didn't define it anywhere.
  16. add this: Server-side: fadeCamera ( source, true ) or Client-side: fadeCamera ( true )
  17. function playMySound() local x, y, z = getElementPosition(localPlayer) local sound = playSound3D ("horn.wav", x, y, z) end function stopMySound() local soundoff = stopSound(sound) end function bindTheKeys() unbindKey("h") bindKey("h", "down", playMySound) bindKey("h", "up", stopMySound) end ((missed out 'end' ))
  18. manve1

    lights

    Use that press on the blue writing and just read. Explains everything.
  19. lblx = guiCreateLabel(853, 306, 478, 39, "", false) guiSetVisible(lblx,false) guiSetFont(lblx, guiCreateFont("Other/TD[M]ER.ttf", 10)) guiSetProperty(lblx, "Disabled", "True") function TDMER( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "img/P.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 50, 0, 400, 100, titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end local x7x GUIEditor = { label = {}, button = {}, } gangWnd = TDMER(272, 161, 729, 490, "???? Gang Panel ????", false) guiSetAlpha(gangWnd, 1.00) guiSetVisible(gangWnd, false) showCursor ( false ) stop = guiCreateButton(54, 388, 98, 31, "•| stop sound |•", false, gangWnd) guiSetFont(stop, "default-bold-small") guiSetProperty(stop, "NormalTextColour", "FFE0DD1E") GUIEditor.label[1] = guiCreateLabel(20, 447, 279, 28, "• Created By TD[M]ER V2.1 •", false, gangWnd) guiLabelSetColor(GUIEditor.label[1], 249, 4, 4) x7x = guiCreateLabel(357, 429, 327, 33, "© Welcome To Server 6AraT ©", false, gangWnd) guiSetFont(x7x, guiCreateFont("Other/TD[M]ER.ttf", 10)) Grove = guiCreateStaticImage(44, 30, 121, 301, "img/Grove.png", false, gangWnd) Ballas = guiCreateStaticImage(374, 30, 121, 302, "img/Ballas.png", false, gangWnd) Aztecas = guiCreateStaticImage(210, 30, 121, 300, "img/Aztecas.png", false, gangWnd) NoTeam = guiCreateStaticImage(538, 30, 124, 304, "img/NoTeam.png", false, gangWnd) GUIEditor.label[3] = guiCreateLabel(64, 341, 93, 21, " § Grove §", false, gangWnd) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.label[4] = guiCreateLabel(220, 341, 93, 21, " § Aztecas §", false, gangWnd) guiSetFont(GUIEditor.label[4], "default-bold-small") GUIEditor.label[5] = guiCreateLabel(403, 343, 71, 25, " § Ballas §", false, gangWnd) guiSetFont(GUIEditor.label[5], "default-bold-small") GUIEditor.label[6] = guiCreateLabel(564, 342, 71, 25, " § NoTeam §", false, gangWnd) guiSetFont(GUIEditor.label[6], "default-bold-small") function color ( ) guiLabelSetColor ( x7x, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) guiLabelSetColor ( lblx, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end setTimer ( color, 200, 0 ) ---------------------------------------- function onGuiClick (button, state, absoluteX, absoluteY) local ip = getLocalPlayer() if source == GUIEditor.label[5] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundN ) stopSound( soundA ) setElementPosition(ip, 214.03983, 1864.13306, 13.14063) soundB = playSound("Other/War.mp3", false) triggerServerEvent("setBallasTeam",getLocalPlayer()) outputChatBox ("you're joining to Ballas war", source, getRootElement(),255,0,0,true) guiSetVisible(lblx,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Ballas War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == GUIEditor.label[3] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundB ) stopSound( soundN ) stopSound( soundA ) setElementPosition(ip, 2498.7, -1680.3, 13.3) soundG = playSound("Other/War.mp3", false) triggerServerEvent("setGroveTeam",getLocalPlayer()) outputChatBox ("you're joining to Grove war", source, getRootElement(),255,0,0,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Grove War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == GUIEditor.label[4] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundN ) setElementPosition(ip, 1569.68652, -1019.28009, 23.91405) showCursor ( false ) soundA = playSound("Other/War.mp3", false) triggerServerEvent("setAztecasTeam",getLocalPlayer()) outputChatBox ("you're joining to Aztecas war", source, getRootElement(),255,0,0,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Aztecas War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == GUIEditor.label[6] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundA ) soundN = playSound("Other/War.mp3", false) triggerServerEvent("setNoTeam",getLocalPlayer()) outputChatBox ("you're joining to NoTeam", source, getRootElement(),255,0,0,true) showCursor ( false ) elseif source == stop then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundN ) stopSound( soundA ) outputChatBox ("sound was stoped", source, getRootElement(),255,0,0,true) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) bindKey ( "F7" , "down" , function() if ( guiGetVisible ( gangWnd ) == true ) then guiSetVisible ( gangWnd ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( gangWnd ) == false ) then guiSetVisible ( gangWnd ,true ) showCursor (false ) guiSetInputEnabled(true) end end )
  20. As far as I know, you must setElementData first then use getElementData to add add the group name.
  21. The problem might be that there is a piece of script that doesn't execute propeately or a twitch which stops it from refreashing after all, just restart the admin panel resource (( /restart admin )) and they should be there
  22. use triggering from server side to client side (( if needed from server side to client and back ))
  23. Client side will work for only one player/ped that executed the function, use server side for all of this. Edit: If you create a vehicle via Client-side, it won't work, it will be as display only
×
×
  • Create New...