Jump to content

devildead622

Members
  • Posts

    144
  • Joined

  • Last visited

Everything posted by devildead622

  1. Thanks, i go try! [lua] outputChatBox ( "Car repared :)", thePlayer )[lua]LOOOOL
  2. function enterVehicle ( thePlayer, seat, jacked ) local modelo = getElementModel (source) if modelo == 422 then setElementData(source, "Tire_inVehicle", 4) setElementData(source, "Engine_inVehicle", 11) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 470 then setElementData(source, "Tire_inVehicle", 4) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 468 then setElementData(source, "Tire_inVehicle", 2) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 433 then setElementData(source, "Tire_inVehicle", 6) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 437 then setElementData(source, "Tire_inVehicle", 6) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 487 then setElementData(source, "Tire_inVehicle", 0) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 497 then setElementData(source, "Tire_inVehicle", 0) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) elseif modelo == 453 then setElementData(source, "Tire_inVehicle", 0) setElementData(source, "Engine_inVehicle", 1) setElementData(source, "Parts_inVehicle", 1) end outputChatBox ( "Car repared \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />", thePlayer ) end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) why not work?
  3. YES! Long time not more samp game. now I'm playing gta online, but with MTA, which is much better. and also let's not compare the LUA with Pawn. '-' (LUA is much better)
  4. ok, thanks! is because I'm used to pawn (samp)
  5. this way will work? localplayer = getLocalPlayer() addEventHandler ( "onPlayerSpawn",root,function() if getElementData( localPlayer, "MAX_Slots") == 8 then --2 '==' is needed setElementData( localPlayer, "M9 SD", 1) setElementData( localPlayer, "M9 SD Mag", 30) setElementData( localPlayer, "Map", 1) end ) function checklife() local playerHealth = getElementHealth ( localplayer ) if (playerHealth > 102 ) then banPlayer ( localplayer, false, false, true, getRootElement (), 'reason ban' ) end setTimer("checklife", 2000, 0) end addEventHandler ( "onPlayerSpawn", getRootElement(), checklife )
  6. Thank you! Is working! I have another doubt: this is correct? localplayer = getLocalPlayer() function spawncomitens() if (getElementData( localplayer, "MAX_Slots") = 8 ) then setElementData( localplayer, "M9 SD", 1) setElementData( localplayer, "M9 SD Mag", 30) setElementData( localplayer, "Map", 1) end end addEventHandler ( "onPlayerSpawn", getRootElement(), spawncomitens ) function checklife() local playerHealth = getElementHealth ( localplayer ) if (playerHealth > 102 ) then banPlayer ( localplayer, false, false, true, getRootElement (), 'reason ban' ) end end addEventHandler ( "onPlayerSpawn", getRootElement(), checklife )
  7. the first, when the player enters the server displays a box with the rules, I'm not trying to make appear automatically
  8. localPlayer = getLocalPlayer() wnd_window = {} addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), function ( theResource ) --outputConsole( "wnd_showServerInfo called" ) --outputConsole( " Fonte: ".. tostring( source ) ) --outputConsole( " resourceStarted: ".. tostring( theResource ) ) if source == getResourceRootElement( theResource ) then --outputConsole( " passed if: source == resource" ) local xml = xmlLoadFile( "server.xml" ) local contents = xmlNodeGetValue( xml ) wnd_create( "Seja Bem Vindo Ao Servidor", "logo.png", contents ) end end ) function wnd_close() guiSetVisible( wnd_window.wnd, false ) showCursor( false ) end addEvent( "window_text", true ) function wnd_create( title, logo, content ) --outputConsole( "wnd_create called" ) if not wnd_window.wnd then --outputConsole( " passed if" ) wnd_window.wnd = guiCreateWindow( 0.1, 0.15, 0.8, 0.7, title, true ) guiWindowSetSizable( wnd_window.wnd, false ) guiWindowSetMovable( wnd_window.wnd, false ) wnd_window.logo = guiCreateStaticImage( 0.01, 0.035, 1.40, 0.25, logo, true, wnd_window.wnd ) --wnd_window.text = content- wnd_window.memo = guiCreateMemo( 0, 0.3, 1, .6, content, true, wnd_window.wnd ) guiMemoSetReadOnly( wnd_window.memo, true ) wnd_window.close_btn = guiCreateButton( 0, .91, .3, 1, "Fechar", true, wnd_window.wnd ) --outputConsole( " window created: ".. tostring( wnd_window.wnd ) ) showCursor( true ) addEventHandler( "onClientGUIClick", wnd_window.close_btn, wnd_close ) end end addEventHandler( "window_text", getRootElement(), wnd_create ) I'm trying to do this: localPlayer = getLocalPlayer() wnd_window = {} addCommandHandler( "beneficios", getResourceRootElement( getThisResource() ), function ( theResource ) --outputConsole( "wnd_showServerInfo called" ) --outputConsole( " Fonte: ".. tostring( source ) ) --outputConsole( " resourceStarted: ".. tostring( theResource ) ) if source == getResourceRootElement( theResource ) then --outputConsole( " passed if: source == resource" ) local xml = xmlLoadFile( "server.xml" ) local contents = xmlNodeGetValue( xml ) wnd_create( "Seja Bem Vindo Ao Servidor", "logo.png", contents ) end end ) function wnd_close() guiSetVisible( wnd_window.wnd, false ) showCursor( false ) end addEvent( "window_text", true ) function wnd_create( title, logo, content ) --outputConsole( "wnd_create called" ) if not wnd_window.wnd then --outputConsole( " passed if" ) wnd_window.wnd = guiCreateWindow( 0.1, 0.15, 0.8, 0.7, title, true ) guiWindowSetSizable( wnd_window.wnd, false ) guiWindowSetMovable( wnd_window.wnd, false ) wnd_window.logo = guiCreateStaticImage( 0.01, 0.035, 1.40, 0.25, logo, true, wnd_window.wnd ) --wnd_window.text = content- wnd_window.memo = guiCreateMemo( 0, 0.3, 1, .6, content, true, wnd_window.wnd ) guiMemoSetReadOnly( wnd_window.memo, true ) wnd_window.close_btn = guiCreateButton( 0, .91, .3, 1, "Fechar", true, wnd_window.wnd ) --outputConsole( " window created: ".. tostring( wnd_window.wnd ) ) showCursor( true ) addEventHandler( "onClientGUIClick", wnd_window.close_btn, wnd_close ) end end addEventHandler( "window_text", getRootElement(), wnd_create ) but it does not work can someone help me?
  9. searched, searched and searched again, but I not found a great deal on a good setup for servers of games by number of players ...
  10. i know just wondered if there was some function to change during the game(for example)
  11. lol... would be good if there
  12. There is a function to set the server name? i searched the wiki/google and not found ...
  13. nothing more! tenhos some mods here want this command to be able to set some thing! setElementData but not this working ...
  14. why not work? function giveitem(playerSource, commandName, thegived, item, n) local accName = getAccountName ( getPlayerAccount (playerSource) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if ( thegived and item and n ) then local namegived = getPlayerFromName(thegived) setElementData (namegived, item, n ) --outputChatBox ( "#ffffffYou gave #ff0000"..item.."#ffffff("..n..")for #ff0000"..getPlayerName(namegived).."!", playerSource, 255, 255, 255, true ) --outputChatBox ( "#ffffffYou won#ff0000 "..item.."#ffffff("..n..") of #ff0000"..getPlayerName(playerSource).."!", namegived, 255, 255, 255, true ) else outputChatBox ( "Correct: #FFFFFF/give Name Item Value", playerSource, 255, 255, 255, true ) end end end addCommandHandler ( "give", giveitem ) example usage in game: setElementData (getPlayerFromName("NICK"), "iten", n ) setElementData (getPlayerFromName("NICK"), "MAX_Slots", 30 )
  15. I know but do not have an example of how to use getScreenFromWorldPosition + dxDrawText
  16. could someone give an example? I'm confused ...
  17. thanks! and for remove the text? could you give me an example of use?
  18. how to make a Text 3d? type of the image (samp)?
  19. I'm doing an anti cheat and have some doubts the former is: this is correct? function checklife(player) local playerHealth = getElementHealth(player) setTimer (checklife, 2000, 0) if playerHealth >= 102 then local theNoob = getPlayerFromName(player) local theNoobSerial = getPlayerSerial(theNoob) addBan( nil, nil, theNoobSerial, player, "Hacker Detectado! LIXAO!" ) end end addEventHandler( "onPlayerSpawn", getRootElement(), checklife )
  20. sorry for the flood! but I need lots of help! someone? if only to say: impossible: even seems that this topic this invisible ...
×
×
  • Create New...