Jump to content

Baseplate

Members
  • Posts

    1,417
  • Joined

  • Last visited

Everything posted by Baseplate

  1. function dimensionSystem(thePlayer,commandName,theTarget) if hasObjectPermissionTo(theTarget, "function.banPlayer",true) then showPlayerHudComponent ( theTarget, "ammo", false ) showPlayerHudComponent ( theTarget, "area_name", false ) showPlayerHudComponent ( theTarget, "armour", false ) showPlayerHudComponent ( theTarget, "breath", false ) showPlayerHudComponent ( theTarget, "clock", false ) showPlayerHudComponent ( theTarget, "health", false ) showPlayerHudComponent ( theTarget, "money", false ) showPlayerHudComponent ( theTarget, "vehicle_name", false ) showPlayerHudComponent ( theTarget, "weapon", false ) showPlayerHudComponent ( theTarget, "radar", false ) showChat( theTarget, false ) else kickPlayer(thePlayer,"Don't abuse the Admin system!") end end addCommandHandler("pban",dimensionSystem) You messed up with the commandName and thePlayer I guess, have a look.
  2. You're comparing an account element to a string, use this instead. function openSniperGate(thePlayer) if (getAccountName(getPlayerAccount(thePlayer)) == "crismar") then moveObject (gate3, 3000, -2772.7, 233.5, 6.3) end end addCommandHandler("openpaty", root, openSniperGate)
  3. https://wiki.multitheftauto.com/wiki/Settings_system
  4. @Gtagasje, no not working sadly..
  5. I'll consider giving this a try, will reply later with the result.
  6. No, besides I wouldn't do it with UPDATE statement.
  7. local connection = dbConnect( "sqlite", "data.db" ) function saveThings() local x, y, z = getElementPosition(source) local accountName = getAccountName(getPlayerAccount(source)) dbExec(connection, "UPDATE players SET skin=?, x=?, y=?, z=?, int=?, dim=?, wanted=?, money=?, occupation=?, team=?, nick=?, wp=? WHERE account=?", tostring(getElementModel(source)), tostring(x), tostring(y), tostring(z), tostring(getElementInterior(source)), tostring(getElementDimension(source)), tostring(getPlayerWantedLevel(source)), tostring(getPlayerMoney(source)), tostring(getElementData(source, "Occupation")), tostring(getTeamName(getPlayerTeam(source))), tostring(getPlayerName(source)), tostring(getElementData(source, "wantedPoints")), accountName) dbExec(connection, "UPDATE weapons SET playerWeaponAmmo0=?, playerWeaponAmmo1=?, playerWeaponAmmo2=?, playerWeaponAmmo3=?, playerWeaponAmmo4=?, playerWeaponAmmo5=?, playerWeaponAmmo6=?, playerWeaponAmmo7=?, playerWeaponAmmo8=?, playerWeaponAmmo9=?, playerWeaponAmmo10=?, playerWeaponAmmo11=?, playerWeaponAmmo10=?, pistolstat=?, silencedstat=?, desertstat=?, shotgunstat=?, sawnoffstat=?, spazstat=?, microstat=?, mp5stat=?, akstat=?, m4stat=?, sniperstat=? WHERE account=?", getPedTotalAmmo(source, 0), getPedTotalAmmo(source, 1), getPedTotalAmmo(source, 2), getPedTotalAmmo(source, 3), getPedTotalAmmo(source, 4), getPedTotalAmmo(source, 5), getPedTotalAmmo(source, 6), getPedTotalAmmo(source, 7), getPedTotalAmmo(source, 8 ) , getPedTotalAmmo(source, 9), getPedTotalAmmo(source, 10), getPedTotalAmmo(source, 11), getPedTotalAmmo(source, 12), getPedStat(source,69), getPedStat(source,70), getPedStat(source,71), getPedStat(source,72), getPedStat(source,73), getPedStat(source,74), getPedStat(source,75), getPedStat(source,76), getPedStat(source,77), getPedStat(source,78), getPedStat(source,79), accountName) end addEventHandler("onPlayerLogout", root, saveThings) addEventHandler("onPlayerQuit", root, saveThings) It doesn't update or do anything on player's quit or logout.
  8. I guess downloadFile won't cause any lag to the server but it may does for the client if his internet connection is total crap.
  9. Weii is surely trusted, I know this guy. Recommended.
  10. Well, you can use downloadFile with onClientFileDownloadComplete for this?
  11. It is still possible but not using outputServerLog, you need to use Server File Functions OR/AND Client File Functions.
  12. function warnPlayersOfDamage(thePlayer, seat) local vhealth = getElementHealth(source) if vhealth < 260 then outputChatBox("Your vehicle is highly damaged. It may explode.", 255, 0, 0) end end addEventHandler("onClientVehicleEnter", root, warnPlayersOfDamage) The source of onClientVehicleEnter is the vehicle that the player entered.
  13. Well, the website looks nice, but just the background color, I feel blind now lol.
  14. Like no offence, if you don't know how then why to waste your money and buy a server..
  15. Oh bradio, hi mate. Well, DayZ servers are increasing those days, just like vG copycats back in the day, I suggest making some sort of a unique and SIMPLE gamemode where players have to chill instead of stressing out on RP/RPG servers...
  16. local chat = true function chatDis(thePlayer) local accName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then outputChatBox("#E3E8B7The chat has been disabled by "..getPlayerName(thePlayer)..".",root,255, 255, 255, true) chat = false end end addCommandHandler("chatoff", chatDis) function chatEn(thePlayer) local accName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then outputChatBox("#E3E8B7The chat has been enabled by "..getPlayerName(thePlayer)..".",root,255, 255, 255, true) chat = true end end addCommandHandler("chaton",chatEn) function onChat(msg, msgType) if (chat == false) and (msgType == 0) then cancelEvent() end end addEventHandler("onPlayerChat", root, onChat)
  17. local chat = true function chatDis(thePlayer) outputChatBox("#E3E8B7The chat has been disabled by "..getPlayerName(thePlayer)..".",root,255, 255, 255, true) chat = false end addCommandHandler("chatoff", chatDis) function chatEn(thePlayer) outputChatBox("#E3E8B7The chat has been enabled by "..getPlayerName(thePlayer)..".",root,255, 255, 255, true) chat = true end addCommandHandler("chaton",chatEn) function onChat() if (chat == false) then cancelEvent() end end addEventHandler("onPlayerChat", root, onChat) I'm not sure if this is gonna work, but give it a try.. Serversided.
  18. Besides, why to use "UPDATE" syntax with dbQuery?
  19. I won't bother myself and waste my time replying, but wanted to ask you a question.. For how much will you be paid for this?
  20. Real funny thing happened, however half of the Staff Team has been kicked yesterday due to his dictatorship.
  21. The whole script is a mess and that's first, secondly, where is the server side part? looks like a ripped off script.
×
×
  • Create New...