Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. setPedStat uses ID's for the stats, not names.
  2. Verifica si tiene el dinero primero usando getPlayerMoney.
  3. Con ese scirpt, podes enviar dinero que no tengas, ya que no verificas si tiene el dinero o no.
  4. You can use the event onElementDataChange with the dataName: "state".
  5. You can't set parent of dxDrawImage.
  6. addCommandHandler ( "setexp", function ( thePlayer, _, who, theExP ) local theExP = tonumber ( theExP ) or 0 local playerWho = getPlayerFromName ( who ) if ( playerWho ) then exports.exp_system:setPlayerEXP ( playerWho, theExP ) end end )
  7. That's because it's what the script does.
  8. It's "setPlayerEXP" not "setPlayerExP".
  9. The resource "exp_system" has these exported functions?
  10. Errors on debugscript?
  11. See? now I understand you, here's an easier way of doing it local LastUsedTime = 0 local commands = { [ "!bitch" ] = { "You're son of a bitch !", "bitch.mp3" }, [ "!suck" ] = { "You suck..", "suck.mp3" }, [ "!2suck" ] = { "Hey ! You suck !", "suck(1).mp3" }, [ "!babies" ] = { "All of you are babies !", "babies.mp3" }, [ "!zag" ] = { "Zag Zag !", "zag.mp3" }, [ "!laugh" ] = { "Muahahahahaha !", "laugh.mp3" }, [ "!noobwins" ] = { "Noob wins..", "noobwins.mp3" }, [ "!noob" ] = { "You're noob !", "noob.mp3" }, [ "!surpise" ] = { "Surprise !", "surprise.mp3" }, [ "!awful" ] = { "Ahahaha.. That's awful !", "awful.mp3" }, [ "!goodmorning" ] = { "Good morning !", "goodmorning.mp3" }, [ "!wth" ] = { "What the hell was that?!", "wth.mp3" } } function scriptStart ( ) outputChatBox ( "[sERVER] Sounds_Commands by Mefisto_PL activated ! Type !help for commands !", source, 255, 255, 255, true ) end addEventHandler ( "onPlayerJoin", getRootElement(), scriptStart ) function helpCommand ( message, type ) if ( string.find ( message,"!help" ) ) and not ( string.find ( message," !help" ) ) then outputChatBox ( "Sounds commands: !awful, !babies, !bitch, !laugh, !goodmorning, !noob, !noobwins, !suck, !2suck, !surprise, !wth, !zag", source ) end end addEventHandler ( "onPlayerChat", getRootElement(), helpCommand ) function soundCommands ( message, type ) local source_name = getPlayerName ( source ):gsub ( "#%x%x%x%x%x%x", "" ) local cmdData = commands [ message ] if ( cmdData ) then outputChatBox ( "*#FF9900" .. source_name .. "#FF4500: ".. cmdData [ 1 ], getRootElement(), 255, 255, 255, true ) if ( getTickCount ( ) - LastUsedTime > 15000 ) then triggerClientEvent ( "startSound", getRootElement(), "sounds/".. cmdData [ 2 ] ) end LastUsedTime = getTickCount ( ) end cancelEvent ( ) end addEventHandler ( "onPlayerChat", getRootElement(), soundCommands ) Now you can add as much commands as you want, with an easy way.
  12. But, WHAT IS THE PROBLEM WITH YOUR CURRENT SCRIPT? you aren't answering my question at all, how do you expect to get help? I don't see the problem, your script is doing what you are saying, so what is the problem with it? If your english is that bad, then go to the Polish section and done.
  13. Why it won't work? you can export the function from one resource and use it in another.
  14. Castillo

    small help

    See what "Teamname" returns.
  15. Castillo

    small help

    Errors on debugscript?
  16. Castillo

    small help

    Must be because 'source' is not a player element. You can do this though, go to the admin resource and open up the meta.xml, then add this: function="getIpCountry"/> Then use this script: addEventHandler ( 'onPlayerConnect', getRootElement(), function ( _, ip ) local country = exports.admin:getIpCountry ( ip ) if ( country == "SA" ) then cancelEvent ( true, "this server not allowed to your country!" ) end end )
  17. Yes, I understood that part, but I don't understand the PROBLEM with your script.
  18. Castillo

    small help

    On server console, do you see something?
  19. Castillo

    small help

    See what 'source' returns. outputDebugString ( getPlayerName ( source ) ) Also you must check == "SA" not == SA.
  20. Castillo

    small help

    I know what it means, does the script work now?
  21. You must change the position/size.
  22. You can make players execute commands with it.
×
×
  • Create New...