Jump to content

EstrategiaGTA

Members
  • Posts

    684
  • Joined

  • Last visited

Everything posted by EstrategiaGTA

  1. EstrategiaGTA

    Advice

    Use this: function playerjoin() showCursor(true) guiSetVisible(gui["loginpanel"]["main"][1],true) guiSetVisible(gui["loginpanel"]["button"][1],true) guiSetVisible(gui["loginpanel"]["button"][2],true) guiSetVisible(gui["loginpanel"]["button"][3],true) guiSetInputEnabled(true) end addEventHandler("onClientResourceStart", resourceRoot, playerjoin)
  2. The window variables are different when creating them and when binding them... Fix that.
  3. Everything was working fine with my GTA: San Andreas, Steam version, untill I wanted to open MTA today afternoon and got a message telling me that Steam version is NOT compatible with MTA. I have been using a Steam version for ages, by the way. Ok, so this message comes and I spend HOURS trying to patch it, I keep getting the same message. Even I had to ask a friend to send me his gta_sa.exe, which did NOT work. I did not try re installing MTA. I touched nothing, I played this morning and now this afternoon this message comes to me... Thanks for the help.
  4. You will have to use getTeamFromName. Try this: function Skinc (sourcee1) local playerr = getPlayerFromName(sourcee1) if getPlayerTeam(playerr) ~= getTeamFromName("Militar")) then outputChatBox (getPlayerName(playerr) .. ' is not Militar Member!', source, 255, 0, 0 ) return end setElementModel ( playerr, 17 ) outputChatBox (getPlayerName(playerr) .. ' #00FF00Has been giving a Militar Skin', source, 255, 0, 0) end addEvent( "Skinc", true) addEventHandler( "Skinc", getRootElement(), Skinc ) Also make sure you passed sourcee1 from the trigger as a player name (string) and not the player itself, else your code will be wrong. Source is not defined in your function either, so I am deleting the outputChatBox with it.
  5. You will have to edit the freeroam resource.
  6. 3: "onPlayerChat" cancelEvent()
  7. Usa: if tostring(getElementData (...)) ~= "Prostituta" then cancelEvent ( ) "onVehicleStartEnter" Y usa dos tablas, una para ladrones y otra para prostitutas.
  8. He could always use onVehicleDamage and/or onClientVehicleDamage and check if the vehicle health is < 50%.
  9. You have the answer right in that topic, in the Exported functions. Use: getText (id)
  10. Imposible sin saber el key y el value que les das. Por ejemplo: setElementData (player, "Trabajo", "Prostituta")
  11. You'll want to use this: guiSetInputMode
  12. What? You just copied my code, although I see you fixed a string error I did. Thanks.
  13. local marker = createMarker(arguments) function markerHit ( hitElement ) if getElementType (hitElement) == "player" then local starter = getPlayerName (hitElement) outputChatBox(starter.." has started the resource!", root, 255, 0, 0, true) destroyElement (marker) startResource (arguments) setTimer( function() marker = createMarker(arguments) stopResource(arguments) outputChatBox("Resource stopped", root, 255, 0, 0) end, 600000,1) end end addEventHandler("onMarkerHit", marker, markerHit)
  14. Add this to the script: function MoverteATuClan ( ) local myNick = "nick" ---pon ahí tu nick local myTeam = getTeamFromName("Nombre del Team") if getPlayerName(source) == myNick then setPlayerTeam(source,myTeam) end end addEventHandler("onPlayerJoin", root, MoverteATuClan)
  15. ¿Qué utilizas para las clases? setAccountData setElementData Funciones SQL
  16. Are you sure you have added this script as a client-side script? This will do nothing, but add a useless line. Add this to your script: function this ( ) local fgt = createObject (arguments) setTimer (setObjectBreakable, 1000, 1, false) end addEventHandler("onClientResourceStart", resourceRoot, this)
  17. local allowed = { [10] = true, [11] = true, [12] = true, [13] = true, [14] = true, [15] = true, [44] = true, [45] = true, [46] = true, [43] = true, } function disableWeaponOnGodMod (prev,new) if getElementData(source, "invincible") and not allowed[getPedWeapon(source)] then takeWeapon(source, not allowed[getPedWeapon(source)]) end end addEventHandler ( "onPlayerWeaponSwitch", root, disableWeaponOnGodMod ) Why do you use onClientRender? By the handler arguments you are using, prev and new, it seems you want to use onPlayerWeaponSwitch.
  18. Yes, it should. But just test it out yourself, and remember to add this useful function in your script, it is not a standard one.
  19. outputChatBox("==================================== ",root,0,200,0) outputChatBox("Element position finder started, here are the commands you can use: ",root,0,200,0) outputChatBox("* /gp - to get your exact x,y,z coordinates",root,20,200,30) outputChatBox("* /gr - to get your exact rotation ",root,20,200,30) outputChatBox("* /cm - to get the exact view of the camera matrix ",root,20,200,30) outputChatBox("==================================== ",root,0,200,0) local plr = localPlayer addCommandHandler("gp", function() local x,y,z = getElementPosition(plr) msg1 = outputChatBox("Your position coordinates are: "..x..","..y..","..z.." | Copied to your clipboard just do Ctrl+V", 0,255,0) setClipboard(msg1) end ) addCommandHandler("gr", function() local xr,yr,zr = getElementRotation(plr) msg2 = outputChatBox("Your position coordinates are: "..xr..","..yr..","..zr.."| Copied to your clipboard just do Ctrl+V",0,255,0) setClipboard(msg2) end ) addCommandHandler("cm", function() local camx,camy,camz,camxr,camyr,camzr = getCameraMatrix(plr) msg3 = outputChatBox("Your camera matrix coordinates are: "..camx..","..camy..","..camz..","..camxr..","..camyr..","..camzr.."| Copied to your clipboard just do Ctrl+V",0,255,0) setClipboard(msg3) end ) That will fix your string errors... But also, I just saw you are using: setClipboard (msg3) msg3 = outputChatBox (...) This will copy to your clipboard outputChatBox (etc)... And you don't want that, do you?
  20. EstrategiaGTA

    Freezing

    function freeze(player) local occveh = getPedOccupiedVehicle(player) if isPedInVehicle(player) == true then if isElementFrozen(occveh) == false then outputChatBox("Your vehicle has been frozen!", player, 79, 226, 249) setElementFrozen(occveh, true) else setElementFrozen(occveh, false) outputChatBox("Your vehicle has been unfrozen!", player, 79, 226, 249) elseif isElementFrozen(player) == true then outputChatBox("You have been unfrozen!", player, 79, 226, 249) else outputChatBox("You have been frozen!", player, 79, 226, 249) setElementFrozen(player, true) end end end end addCommandHandler("freeze", freeze)
  21. Es un error en la línea 1 del script. Postea el código.
  22. If the problem is that your players abuse reconnecting, you could use this: onPlayerQuit banPlayer So when a player quits your server, he is banned for some seconds, in order to stop him reconnecting.
  23. I can start them by console... anyways help with this please? http://imgur.com/a/Jt5BR What can you do? It is a compiled script, you cannot edit it or fix it.
  24. Use the event onClientKey, with the key "mouse1".
×
×
  • Create New...