Jump to content

WhoAmI

Members
  • Posts

    1,248
  • Joined

  • Last visited

Everything posted by WhoAmI

  1. Well I can't see an error, maybe someone with more experience would help you.
  2. Everything looks fine, hmm. Any errors? Put outputChatBox after loadstring to check if script gets there.
  3. outputConsole(DrawString) Does it output correct stuff?
  4. loadstring doesn't work because you put it after 'return'.
  5. dbExec ( getElementData ( resourceRoot, "dayz:resource.settings.database" ), "INSERT INTO `players` (`serial`,`password`,`data`) VALUES (?,?,?)", "serial", "password", "3,4" ) For checking what is in database, I prefer: https://addons.mozilla.org/pl/firefox/a ... e-manager/
  6. I only found this https://wiki.multitheftauto.com/wiki/DxDrawGifImage Or create image with long width and just change the X position.
  7. WhoAmI

    Synced Ball

    Maybe you have to user moveObject
  8. --SERVER function makeitburn ( player, commandName, fdfire ) triggerClientEvent( "createfdfire", player, fdfire ) end addCommandHandler ( "fdfire", makeitburn ) --CLIENT function fdfire ( fireid ) if fireid then if tonumber(fireid) == 1 then createFire(1700, -1168, 23, 60) createFire(1698, -1168, 23, 60) local blipicon = createBlip( 1700, -1168, 23, 43, 0, 0, 0, 255 ) outputChatBox("Fire created at 1700, -1168, 23") local onlinePlayers = getElementsByType("player") for index, player in pairs(onlinePlayers) do local x, y, z = getElementPosition(player) local distance = getDistanceBetweenPoints3D(1725, -1130, 24, x, y, z) if (distance <50) then setTimer(function () destroyElement(blipicon) end, 900000, 1) setTimer(function () triggerEvent("ringTheBell", player) end, 5000, 1) end end elseif tonumber(fireid) == 2 then createFire(1729, -1174, 23, 60) createFire(1727, -1174, 23, 60) local blipicon = createBlip( 1729, -1174, 23, 43, 0, 0, 0, 255 ) outputChatBox("Fire created at 1729, -1174, 23") local onlinePlayers = getElementsByType("player") for index, player in pairs(onlinePlayers) do local x, y, z = getElementPosition(player) local distance = getDistanceBetweenPoints3D(1725, -1130, 24, x, y, z) if (distance <50) then setTimer(function () destroyElement(blipicon) end, 900000, 1) setTimer(function () triggerEvent("ringTheBell", player) end, 5000, 1) end end else outputChatBox("Missing ID") end else outputChatBox("Syntax: /fdfire [id]", thePlayer) outputChatBox("IDs available: 1, 2", thePlayer) end end -- addCommandHandler("fdfire", fdfire) addEvent ( "createfdfire", true ) addEventHandler ( "createfdfire", root, fdfire )
  9. Check this out addEventHandler ( "onClientPlayerChoke", localPlayer, function ( weapon ) if ( source ~= localPlayer ) then return end if ( weapon == 41 ) then cancelEvent() end end )
  10. Next time be more specific when you are creating the topic. I wasn't sure what are you talking about. Anyway, You're welcome.
  11. I'm not sure if it will works, but addEventHandler ( "onPlayerCommand", root, function ( command ) if ( command == "login" or command == "register" ) then cancelEvent ( ) end end ) @UP was faster.
  12. function makeitburn (player, commandName, fdfire) triggerClientEvent( "createfdfire", player, fdfire ) end addCommandHandler ( "fdfire", makeitburn ) /fdfire something If doesn't work show us clientside.
  13. addEventHandler ( "onPlayerChat", root, function ( message, messageType ) if ( messageType == 2 ) then cancelEvent ( ) local name = getPlayerName ( source ) local team = getPlayerTeam ( source ) for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerTeam ( player ) == team ) then outputChatBox ( name .. "#FFFFFF: " .. message, player, 255, 255, 255, true ) end end end end ) Check this out ( serverside script ).
  14. But what bug? USE BRAIN. Any errors? Don't act like stupid.
  15. onPlayerTarget event is way better.
  16. getPedTarget destroyElement
  17. Lol, man. What bug? Any errors in debug?
  18. Just delete takeAllWeapons ( source ) from onPlayerWasted event.
  19. You're welcome. But I got no idea for what are you doing this?
  20. You're welcome, cheers from Poland.
  21. Try this setPlayerTeam ( source, getTeamFromName ( "VIP" ) )
  22. accountData = setAccountData accountData ( account, string, value )
  23. WhoAmI

    Team Data?

    Don't use timer, use event onElementDataChange instead. If someone get kill you are setting the data, so the event would be triggered.
×
×
  • Create New...