Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. onClientPlayerJoin is triggered by remote players only, use onClientResourceStart instead.
  2. Post the whole script.
  3. My script didn't work? it should get all the data of the specified element.
  4. Post the script.
  5. Why are you using that? dxDrawText supports HEX codes by default now.
  6. Castillo

    Weather

    I don't understand what do you mean.
  7. Okay, finish it with the off topic please.
  8. I personally like Notepad++, it mayn't have what you mentioned, but still, is perfect for me.
  9. Castillo

    help ^^

    You're welcome.
  10. Try this: local element = getElementByID ( "THEID" ) if isElement ( element ) then local allData = getAllElementData ( element ) for data, value in pairs ( allData ) do outputChatBox ( data ..": ".. value ) end end
  11. We don't accept requests here, learn to make it by yourself or pay someone to do it for you.
  12. You're welcome.
  13. Castillo

    help

    local warn = { } function command ( sourcePlayer, command, who ) if ( not who ) then outputChatBox ( "Syntaxa Invalida:/warn NUMEJUCATOR.", sourcePlayer ) return end local name = getPlayerFromName ( who ) if ( name ) then local acc = getPlayerAccount ( sourcePlayer ) local accName = getAccountName ( getPlayerAccount ( sourcePlayer ) ) -- get his account name if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Admin" ) ) then if ( not warn[ name ] ) then -- hasn't got a warning yet warn [ name ] = 1 else warn [ name ] = ( warn [ name ] + 1 ) --alredy has waring(s), so give one more carne = setAccountData ( acc, "warns", warn [ name ] ) outputChatBox ( "Administratorul ".. accName .." la avertizat pe : ".. who ..", si acum are ".. warn [ name ] .." avertisment(e)", getRootElement(), 255, 0, 0 ) end if ( carne ) then outputChatBox ( "asdadad" ) end if ( warn [ name ] >= 3 ) then -- 3 warnings = ban banPlayer ( name, true, who, false, sourcePlayer, "Avertismente.", 0 ) outputChatBox ( "Jucatorul ".. who .." a fost banat permanent din cauza avertisementelor.", getRootElement(), 255, 0, 0 ) end end end end addCommandHandler ( "warn", command ) addEventHandler ( "onPlayerLogin", getRootElement(), function ( _, acc ) local warns = tonumber ( getAccountData ( acc, "warns" ) ) or 0 warn [ name ] = warns end )
  14. What do you mean by "convert this script to draw a number, instead of a gui lable"?
  15. Castillo

    problem sql

    addEventHandler ( "onResourceStart", resourceRoot, function ( ) local result = executeSQLQuery ( "CREATE TABLE IF NOT EXISTS Save_Money_Account (Account TEXT,Money TEXT)" ) outputChatBox ( "QUERY RESULT: ".. tostring ( result ) ) outputDebugString ( "Sql Save Money loaded .", 3 ) end ) Try that and see what it outputs to chatbox.
  16. "onPlayerLevelUP" es un evento propio, asi que tambien hay que usar addEvent. addEvent ( "onPlayerLevelUP", true )
  17. Castillo

    help ^^

    Change: if isObjectInACLGroup ( "User.".. accName, aclGetGroup ( "Admin" ) ) then to: if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Admin" ) ) then
  18. Castillo

    SMS script

    Nowhere, nobody will make it for you, you must learn to do it by yourself or pay someone to do it for you.
  19. Castillo

    LUA Help.

    You're welcome.
  20. Castillo

    SMS script

    We don't accept requests here.
  21. Castillo

    LUA Help.

    With my code it'll always switch back to fist ( 0 ) if the ping is 900 or higher.
  22. Castillo

    LUA Help.

    Well, firstly, "onPlayerWeaponSwitch" uses "source", the two arguments are the previous and the current weapon, second, you made two functions, one which is not connected to the other in any way, so it's not going to work. function playerPing ( ) if ( getPlayerPing ( source ) >= 900 ) then outputChatBox ( "Your ping is above 900, you may not use weapons until your ping is lowered", source, 255, 0, 0 ) setPedWeaponSlot ( source, 0 ) end end addEventHandler ( "onPlayerWeaponSwitch", root, playerPing )
  23. That's your local IP address.
  24. But where did you get that script from?
  25. No entiendo la verdad, decis que solo dispara una vez? si es asi, entonces podes usar un timer para disparar varias veces.
×
×
  • Create New...