Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. function greetPlayer ( ) local playername = getPlayerName ( source ) local serverName = getServerName( ) exports ["guimessages"] : outputServer ( source, "".. playername ..",welcome to ".. serverName .."!" , 255, 255, 255 ) greetPlayerforum ( source ) end addEventHandler ( "onPlayerLogin", getRootElement(), greetPlayer ) function greetPlayerforum ( thePlayer ) exports ["guimessages"] : outputServer ( thePlayer, "Visit our forum! [url=http://www.sanb.smfnew.com]www.sanb.smfnew.com[/url]" , 255, 255, 255 ) pTimer = setTimer ( greetPlayerforum, 10000, 1, thePlayer ) end You wanted that?
  2. Castillo

    Serials

    Try this: executeSQLQuery( "INSERT INTO banList (playerIP) VALUES (".. getPlayerIP ( source ) ..")" )
  3. Castillo

    Serials

    executeSQLCreateTable( "banList", "playerIP TEXT" ) function saveData(source) executeSQLQuery( "UPDATE banList SET playerIP = '".. getPlayerIP ( source ) .."' WHERE playerIP = '".. getPlayerIP ( source ) .."'" ) end addCommandHandler("set", saveData)
  4. teams = { [ "Las Venturas Police" ] = true, [ "El Quebrados Sheriff" ] = true [ "S.W.A.T" ] = true, [ "S.A.S" ] = true [ "C.I.A" ] = true, [ "Federal Bureau of Investigation" ] = true [ "Fort Carson Sheriff" ] = true [ "National Guard" ] = true [ "Fort Carson Sheriff" ] = true } You got missing commas after each team, only last one doesn't has to have a comma. Btw, your code is wrong, the if ( teams [ teamName ] ) was supposed to be inside your command function.
  5. Castillo

    problem

    Are you kidding me? the script is stolen, it won't be yours because you rename an argument. Topic locked.
  6. Castillo

    Serials

    Check the XML functions, start reading about how it works, do test scripts, then you can proceed with a bigger one.
  7. Castillo

    problem

    We don't help with stolen scripts. You may wonder how do I know that, well, simple, the arguments are fu** up when you decompile a script.
  8. You mean your position as spammer? then no I think.
  9. teams = { [ "LSPD" ] = true, [ "SFPD" ] = true } That's our allowed team table. Now you must check if the team name of the player that used the command is on that table, something like this: if ( teams [ teamName ] ) then -- Your code end
  10. No se para que necesitas un timer, lo que yo dije no es tan dificil.
  11. If I'm right, the problem is solved.
  12. Castillo

    Serials

    You can do it MySQL/SQLite/XML based.
  13. You can make a table with the teams you wish to be able to use the command and then check if the player team is on that table. getPlayerTeam getTeamName
  14. If you don't set that to "false", when you click on another GUI, it'll trigger that function.
  15. That image is too small, upload it again to imgur.com.
  16. Entonces vas a tener que usar element data o una tabla server side, al entrar al vehiculo checkear si tiene esa data, entonces hacerlo explotar.
  17. Castillo

    script editor

    That's a program, you can execute it from the executable file ( .exe ).
  18. function blowVehicleEnter ( ) blowVehicle ( getPedOccupiedVehicle ( source ) ) end addEvent ( "elEvento", true ) addEventHandler ( "elEvento", root, blowVehicleEnter )
  19. Ese evento es nativo del MTA, proba con otro nombre.
  20. Eso es porque addEventHandler no se puede usar para saber si ya existe.
  21. Forget about what I said. function collision ( collider, force, bodyPart, x, y, z, vx, vy, vz ) if (getElementType (collider) == "vehicle") and (source == getPedOccupiedVehicle (getLocalPlayer())) then actualspeed = ( vx ^ 2 + vy ^ 2 + vz ^ 2 ) ^ 0.5 * 1.61 * 100 outputChatBox ( actualspeed ) end end addEventHandler("onClientVehicleCollision", root, collision) I copied how getElementSpeed function works, try it.
  22. But that event is triggered on collision, how do you expect to get the speed before hit on the event that is triggered on collision?
  23. cancelEvent() That's not needed, you can't cancel death.
  24. The player that died is 'source'.
×
×
  • Create New...