Jump to content

SpecT

Members
  • Posts

    656
  • Joined

  • Days Won

    9

Everything posted by SpecT

  1. @ArminFx He means a rectangle with rounded borders not outline ... @RELEASE You can use an image to make what you want. Some more info: https://forum.multitheftauto.com/viewtopic.php?f=91&t=74756
  2. SpecT

    I need help

    Event: OnPlayerChat if msg == "leave" then cancelEvent That's all you have to do ..
  3. function getPlayerFromNamePart ( name ) if ( name ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do local name_ = getPlayerName ( player ):gsub ( "#%x%x%x%x%x%x", "" ):lower ( ) if name_:find ( tostring ( name ):lower ( ), 1, true ) then return player end end end end
  4. If it gives you this error then probably the sound did end ... soo before you try to stop the sound you should check if it isElement. sound = playSound(click) setTimer ( function() if isElement(sound) then stopSound(sound) end end, 50, 1 )
  5. As I can see you used guieditor. Why didn't you set the position to relative (from the right click menu) ?
  6. I'm not really sure what you need but I think that this will help you: outputChatBox ( getPlayerName ( source ).."#ffffff: "..messages[math.random(1,#messages)]" ("..reason..")") And why do you need this in client-side ? This will show up when the player quits so probably he won't see the message.
  7. Maybe if you show the client-side code people would help you ...
  8. SpecT

    HELP PLEASE!

    Are you sure the type of the file isn't set to server in the meta ?
  9. SpecT

    Solved..

    Sorry, I posted it before I see you solved it and my bad ... its result["Nicks"] I didn't notice that the variable name is changed. Anyway, good luck with whatever you are working on!
  10. Because setmap (/nextmap) is in the Race gamemode and it has nothing to do with the ACL. The function is getting the settings of the gamemode and if player is in that group (Admin or SuperModerator) then he will be able to set a nextmap. The ban, mute, kick, etc. commands are in the Admin system not the Race gamemode.
  11. In the admin panel go to Resources then find Race. Mark it and press settings then scroll down to Admin group and add SuperModerator. Value example: Admin,SuperModerator
  12. SpecT

    Solved..

    function whenPlayerChangeNick(_, newNick) local newNick = removeHexColorCode(newNick) local serial = getPlayerSerial(source) local q = dbQuery(database,"SELECT * FROM Nick WHERE Serial = ?", serial) local result = dbPoll(q, -1) if (result) then local actualNicks = poll["Nicks"] if string.find(actualNicks, newNick) then else local addNewNick = actualNicks .. ", " .. newNick dbExec(database, "UPDATE Nick SET Nicks = ? WHERE Serial = ?", addNewNick, serial) end else dbExec(database, "INSERT INTO Nick VALUES(?,?)", addNewNick, serial) end end addEventHandler("onPlayerChangeNick", getRootElement(), whenPlayerChangeNick)
  13. Oh, my bad. I didn't get you the first time. There you go: function countDown(player, _, limit) local limit = tonumber(limit)+1 for i = 1, limit do if i < limit then msg("[Count Down] " ..i, root) else msg("[Count Down] GO GO GO", root, 255,255,0) end end end addCommandHandler("c", countDown) BTW it would be better if you make it with timer (per 1 second). Good luck!
  14. I just tested it and it worked fine. Don't forget to type the limit when you use the command !!!
  15. This should work: function countDown(player, _, limit) for i = 1, limit do if i ~= limit then msg("[Count Down] " ..i, root) else msg("[Count Down] GO GO GO", root, 255,255,0) end end end addCommandHandler("c", countDown)
  16. Loop the table (data) ? for i, data in pairs(data) do -- etc end
  17. SpecT

    Bad argument

    Because to set a timer there should be a function to execute after time. You can make that function inside the setTimer as ozulus did or make it outside and then put the function name and the arguments in the timer. This is how it works and we can't do anything about it.
  18. The 3rd argument of engineApplyShaderToWorldTexture is targetElement. So you could loop thru all the players and apply it to everyone.
  19. You could make a custom script loader. And when the function playSound is used it will stream the sound from the HTTP server. If the server has fastdl it would be much easier but if it doesn't then you could make it as the example below: Example: http://localhost:22005/mapName/music.mp3
  20. This should work. local objectSpawn = { {1343.36511,1541.53662,10.82031}, {1344.08984,1531.10254,10.82031}, {1350.97217,1535.13367,10.82031} } function SpawnPicks ( ) for i,v in ipairs(objectSpawn) do local x,y,z = v[1],v[2],v[3] createObject(1337,x,y,z,nil,nil,nil) end end addEventHandler ( "onResourceStart", resourceRoot, SpawnPicks )
  21. Hostinger is almost the same as 000webhost. To get remote MySQL you need to pay. The only way you can access the MySQL is to use their servers.
×
×
  • Create New...