Jump to content

ozulus

Members
  • Posts

    131
  • Joined

  • Last visited

Everything posted by ozulus

  1. This should work. local numberCounter = 0 function numberup() numberCounter = numberCounter + 1 outputChatBox(numberCounter) end addCommandHandler("number",numberup)
  2. Use this code in client side not server side.
  3. You are wrong, use this. It will work. addCommandHandler("salon",viewGui)
  4. ozulus

    [HELP] Please

    I guess you didn't modify the ACL. https://wiki.multitheftauto.com/wiki/CallRemote
  5. ozulus

    [HELP] Please

    You forgot to add callback function. function callBack() end function n () local server = "LOL" callRemote ( "ip", getResourceName(getThisResource()), "outputChatBoxRemote", callBack, server.." is good server "..getPlayerCount().."", type, server ) end addCommandHandler("n", n)
  6. Use this function to create border effect, it will be easier for you. https://wiki.multitheftauto.com/wiki/Dx ... dRectangle
  7. Xiti's race.zip was stoled and shared please delete https://community.multitheftauto.com/ind ... s&id=12222 DONE
  8. Check this one: https://community.multitheftauto.com/ind ... ils&id=488
  9. Check this https://github.com/mtadayz/MTADayZ/tree ... asecreator
  10. ozulus

    [HELP] Script

    Firewall = { [ 'PlayerName' ] = 'SerialPlayer', [ 'TEST' ] = '9C9F3B55D9D7BB7135FF274D3BF444E4', [ 'Name2' ] = 'Serial', } function onPlayerJoin_KickHandler ( ) for Nick,Serial in pairs ( Firewall ) do if removeColorCode( getPlayerName ( source ) ) == Nick and getPlayerSerial ( source ) ~= Serial then kickPlayer ( source, "Reason: !" ) end end end addEventHandler ( 'onPlayerJoin', getRootElement(), onPlayerJoin_KickHandler) function onPlayerChangeNick_KickHandler ( oldNick, newNick ) for Nick,Serial in pairs ( Firewall ) do if removeColorCode( newNick ) == Nick and getPlayerSerial ( source ) ~= Serial then kickPlayer ( source, "Reason: !" ) end end end addEventHandler ( 'onPlayerChangeNick', getRootElement(), onPlayerChangeNick_KickHandler) function removeColorCode( s ) return s:gsub( '#%x%x%x%x%x%x', '' ) or s end
  11. Output is nothing because ID isn't defined. Use this code. It outputs marker id or false for _,mark in pairs(getElementsByType("marker")) do if getElementData(mark,"ID") then outputChatBox(getElementData(mark,"ID"),getRootElement()) else outputChatBox(getElementData(mark,"ID"),getRootElement()) end end
  12. ozulus

    [HELP] Script

    ipairs work only with number indexes and number indexes should be order -- ' Server Side ' ; Firewall = { [ 'PlayerName' ] = 'SerialPlayer', [ 'Name1' ] = 'Serial', [ 'Name2' ] = 'Serial', } addEventHandler ( 'onPlayerJoin', root, function ( ) for Nick,Serial in pairs ( Firewall ) do if getPlayerName ( source ) == Nick and getPlayerSerial ( source ) ~= Serial then kickPlayer ( source, "..." ) end end end )
  13. ozulus

    [HELP] Script

    Firewall = { [ 'PlayerName' ] = 'SerialPlayer', [ 'Name1' ] = 'Serial', [ 'Name2' ] = 'Serial', } addEventHandler ( 'onPlayerJoin', getRootElement ( ), function ( ) --no parameters!!! local Serial = Firewall[removeColorCode(getPlayerName(source))] if ( Serial ) then if Serial ~= getPlayerSerial ( source ) then kickPlayer ( source, "Reason: blabla" ) end end end ) function removeColorCode( s ) return s:gsub( '#%x%x%x%x%x%x', '' ) or s end
  14. function setSkinOnSpawn () setPedSkin ( source, 0 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), setSkinOnSpawn )
  15. ozulus

    [HELP] Script

    Are you using your own mute system or default admin script's mute system? If you are using own script, please show the codes. Also did you try codes which i wrote?
  16. ozulus

    [HELP] Script

    Why do you want to use cancelEvent() ? These are enough for you. function mute () setElementData(source, "ttt", (getElementData(source, "ttt") or 0) + 1) end addEventHandler("onPlayerMute", getRootElement(), mute) function unmute() setElementData(source, "ttt", 0) end addEventHandler("onPlayerUnmute", root, unmute) important note
  17. ozulus

    [HELP] Script

    You can use cancelEvent(). Also i don't understand exactly what you want
  18. ozulus

    [HELP] Script

    function unmute() setElementData(source, "ttt", 0) end addEventHandler("onPlayerUnmute", root, unmute)
  19. ozulus

    I need help

    I don't know the first problem but maybe i can help you about getting vehicle color into db. You must edit dbQuery function cuz i dont know your table(s) name. Maybe it wont work (i wrote that on my cellphone) function getVehicleColorFromDb(vehicleName) local query = dbQuery( connection, "SELECT color FROM `vehicle` WHERE vehicleName='".. tostring(vehicleName) .."'") local result, numrows, errmsg = dbPoll( query, -1 ) if (result) then local vehicleColorString = tostring(result[1]["color"]) end local vehicleColorTable = split(vehicleColorString, string.byte(',')) if vehicleColorTable then return tonumber(vehicleColorTable[1]), tonumber(vehicleColorTable[2]), tonumber(vehicleColorTable[3]) -- r, g, b end return false end
  20. Try that local marker6 = createMarker(-1066.28, -1146.61, 129.87, 'cylinder', 3, 250, 250, 250, 250) local alpha = 170 function markerHit6(hitElement, matchingDimension, player) if getElementType(hitElement) =="player" then if getPlayerTeam(hitElement) and getTeamName (getPlayerTeam(hitElement)) == "America" then if isElement(GA6) then outputChatBox("Please,Stay 10 Secs in the marker to capture the area!",thePlayer,255,109 ,109 ) timer6 = setTimer ( captureAreaA6, 4000, 1 ) else cancelEvent() end elseif getPlayerTeam(hitElement) and getTeamName (getPlayerTeam(hitElement)) == "German" then if isElement(UA6) then outputChatBox("Please,Stay 10 Secs in the marker to capture the area!",thePlayer,255,109 ,109 ) timer6 = setTimer ( captureAreaG6, 4000, 1 ) else cancelEvent() end end end end addEventHandler("onMarkerHit", marker6, markerHit6) function captureAreaG6(commandName, player) GA6 = createRadarArea ( -1220, -1165, 250, 300, 40, 40, 40, alpha ) markerG6 = createMarker ( -1082.77, -1173.14, 128, "cylinder", 3, 255, 255, 0, 170 ) if isElement(markerA6) then destroyElement ( markerA6 ) destroyElement ( UA6 ) end end function captureAreaA6(commandName, player) UA6 = createRadarArea ( -1220, -1165, 250, 300, 255, 255, 31, alpha ) markerA6 = createMarker ( -1082.77, -1173.14, 128, "cylinder", 3, 255, 255, 0, 170 ) if isElement(markerG6) then destroyElement ( markerG6 ) destroyElement ( GA6 ) end end
  21. ozulus

    Server list spam

    server name: Best Ever of Turkey Destruction Derby fake: mtasa://5.62.126.246:12400 real: mtasa://5.62.127.25:11400
  22. Thank you so so much dude! That's what i want.
  23. I have one more problem. I converted string which is "Furkan Ozulus", but i want to get random characters from that string. So it would be like that : F _ r _ a _ _ z _ l _ s How can i do it ?
  24. Thanks for your quick reply, i gonna try Edit : Working thanks
×
×
  • Create New...