Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. No se si podes usar espacios en los archivos.
  2. function musicambientalfunc ( _, modo ) local encendida = getElementData ( localPlayer, "musica.on" ) if (encendida) then if ( modo == 1 ) and ( encendida == false ) then local musicambiental = playSound("Bruzko - El frio - [url=http://www.HHGroups.com.mp3]www.HHGroups.com.mp3[/url]") setElementData ( localPlayer, "musica.on", true ) elseif ( modo == 2 ) and ( encendida == false ) then local musicambiental = playSound("Bruzko - El frio - [url=http://www.HHGroups.com.mp3]www.HHGroups.com.mp3[/url]") setElementData ( localPlayer, "musica.on", true ) elseif ( modo == 3 ) and ( encendida == false ) then local musicambiental = playSound("Bruzko - El frio - [url=http://www.HHGroups.com.mp3]www.HHGroups.com.mp3[/url]") setElementData ( localPlayer, "musica.on", true ) elseif ( modo == 4 ) and ( encendida == false ) then local musicambiental = playSound("Bruzko - El frio - [url=http://www.HHGroups.com.mp3]www.HHGroups.com.mp3[/url]") setElementData ( localPlayer, "musica.on", true ) elseif ( modo == 5 ) and ( encendida == false ) then local musicambiental = playSound("Bruzko - El frio - [url=http://www.HHGroups.com.mp3]www.HHGroups.com.mp3[/url]") setElementData ( localPlayer, "musica.on", true ) elseif ( modo == off ) and ( encendida == true ) then stopSound(musicambiental) setElementData ( localPlayer, "musica.on", false ) end end end addCommandHandler ( "ambiente", musicambientalfunc ) function dejarenoffalspawn ( ) setElementData ( localPlayer, "musica.on", false ) end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), dejarenoffalspawn ) El primer argumento de addCommandHandler client side es el nombre del comando que usaste.
  3. If you replace a skin, the other players with that skin will look like you as well.
  4. function MySQL_GetString(feldN, tableN, bedingung) local result = mysql_query(sqlcon, "SELECT "..feldN.." FROM "..tableN.." WHERE Username='"..mysql_escape_string(sqlcon, bedingung).."';") -- Your argument is: "bedingung", not "username". if (not result) then outputDebugString(mysql_error(sqlcon)) else if(mysql_num_rows(result) > 0) then local ds = mysql_fetch_assoc(result) local savename = feldname mysql_free_result(result) return ds[feldname] else mysql_free_result(result) return false end end end Read comment.
  5. Post your entire code.
  6. That's because is wrong syntax. local result = mysql_query(sqlcon, "SELECT ".. feldN .." FROM ".. tableN .." WHERE columnName = ".. bedingung .."")
  7. Castillo

    play Sound

    Has to be, I've saved Lua tables before without problems.
  8. Castillo

    play Sound

    You can save lua tables as item data as well, no need for JSONs.
  9. Castillo

    a formal help

    I'm I right when I think that you don't even know the basics of Lua scripting? if so, you should start with easier scripts.
  10. As I said above, his code is a mess, will not work.
  11. Castillo

    a formal help

    createTeam addCommandHandler getTeamFromName setPlayerTeam
  12. That's just a mess, it has a lot of syntax errors.
  13. addCommandHandler getElementsByType getPlayerAccount getAccountName isObjectInACLGroup outputChatBox
  14. In your meta.xml it has something like: resource="name" /> ?
  15. Yes, indeed. You're welcome.
  16. If these resources we're included from the resource that got restarted, then yes if I'm right.
  17. No. getTeamName: Get's the name of a team element getTeamFromName: Get's a team element from a name.
  18. Yes, and then to load the team you just use: getTeamFromName which will return the team element from it's name.
  19. Castillo

    Elevator

    What do you mean by "end of the map"? do you mean like until round ends? if so, just put that script inside your map folder and it'll stop when the map changes.
  20. createPed setPedAnimation setPedControlState
  21. You can create peds and set animations to them, but they won't show up as players.
  22. Castillo

    Elevator

    local elevator = createObject ( 971, 3226.3999023438, -2897.3999023438, 15.60000038147, 89.249816894531, 180, 231.75024414063 ) moveObject ( elevator, 10000, 3226.3999023438, -2897.3999023438, 29.60000038147, 89.249816894531, 180, 231.75024414063 ) setTimer ( moveObject, 10000, 1, elevator, 1000, 3226.3999023438, -2897.3999023438, 15.60000038147 ) There's no need for a "while".
  23. That's what it said when I warped myself to the colshape.
×
×
  • Create New...