Jump to content

Corsaro Quad

  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Corsaro Quad

  • Rank
  • Birthday 01/03/1986


  • Location
    Italy, EU
  • Interests
    Software engineering.
  1. Thanks. It works. (spawn(source) is my personal function) But now it doesn't work the playSound... How can I resolve this?
  2. Hi. I've started to write the login GUI. I followed the tutorial on MTA wiki but there is a problem, in my mind, on triggering the server event. And I want to play a mp3 file when the player join into the server, but it doesn't work... This is the client code: function createLoginWindow() lblReportTxt = "Please LogIn." wdwLogin = guiCreateWindow(504,255,407,175,"Welcome!",false) lblReport = guiCreateLabel(15,27,70,16,lblReportTxt,false,wdwLogin) btnLogin = guiCreateButton(316,146,80,20,"LogIn",false,wdwLogin) lblUser = guiCreateLabel(85,62,61,17,"Username: ",false,w
  3. It works. Thanks. Update: It releases a space before the word... Is there a method to delete this space?
  4. Example: /do some actions Output on the Chat: some actions I think the gettok of value var take only the second word when I type the command. But I want to take and output infinite words after cmd value.
  5. Sorry for the double post but I have a problem with value var. In fact it reads only 1 token, but I want to read more tokens. Example: /do do some actions... It should outputs: * do some actions... I think to replace gettok to another function... This is the code: chat_range = 100 function onChat(player,_,...) cancelEvent() local x, y = getElementPosition(player) local circlearea = createColSphere ( x, y, 5, chat_range ) local msg = table.concat({...}, " ") local r,g,b = 255,255,255 local cmd = gettok(msg, 1, 32) local value = gettok(msg, 2, 32)
  6. Ok. I try to recovery it... But a little question, can I set this script as a client-side script?
  7. Thanks man. It finally works! Thank you so much! /Solved Update: A little question, can I set this script as a Client-Side script?
  8. Thanks. I replaced it with createColCircle. Now it doesn't output the command or the simple message. How can I resolve it? (Remember: with isPlayerInRangeOfPoint it works fine!)
  9. It doesn't work... it doesn't output the command or the simple message and the server gives some errors: WARNING: Bad argument @ 'createColSphere' WARNING: Bad argument @ 'getElementsWithinColShape' ERROR: bad argument #1 to 'ipairs' (table expected, got boolean) WARNING: Bad argument @ 'createColSphere' WARNING: Bad argument @ 'getElementsWithinColShape' ERROR: bad argument #1 to 'ipairs' (table expected, got boolean)
  10. Fixed, but with isPlayerInRangeOfPoint. With isPlayerWithinColShape it doesn't work... Could you change from isPlayerInRangeOfPoint to isPlayerWithinColShape? Thanks. This is the code: --Code deleted.
  11. The normal chat not works but the command works fine. I replaced the isPlayerInRangeOfPoint with isPlayerWithinColShape and the server give me an error... Error: Bad argument @ 'isElementWithinColShape' Code: --Code deleted.
  12. Thanks man. Your explanation is very simple and the code now works fine. Thanks so much! EDIT: Oh... the server says the value var is a boolean value, but it outputs the text correctly... Server Error: "ERROR: resourcetest\localchat.lua:47: attempt to concatenate local 'value' (a boolean value)" This is the code: --Code deleted.
  13. Ok it works thanks. But now when I use a command with more arguments (example: /me blah blah blah or /pm Bob Yes I know! ) it doesn't work, it output normally the text. How can I resolve it? Thanks.
  • Create New...