Jump to content

nlmarkoesnl

Members
  • Posts

    10
  • Joined

  • Last visited

Details

  • Gang
    WDS

nlmarkoesnl's Achievements

Member

Member (5/54)

0

Reputation

  1. alright thx! Going to try it out! greets
  2. hey all.. got a dumb question. I want to make my retancle in Dark grey. but i forgot the color code of it. -,- it was something like this right: 0.105,105,105 ? Greetings
  3. hey all I got a small qeustion. Is there maby a place were you can buy DM/DD maps? Like from creators: Vortex,PAwlo etc. Greetings Mark
  4. i did debugscript and got this: main_client.lua:1101: bad argument @ 'guiSetVisible' [Expected argument 1, got nil] here is the script: -------------------- -- Set all variables -------------------- screenWidth, screenHeight = guiGetScreenSize() function setVariables() killedByAfk = 0 betPlayer = "none" betAmount = 0 oldAmount = 0 achievementActive = 0 end addEventHandler("onClientResourceStart",getRootElement(),setVariables) function vars2() colorPickMode = false afkCounter = 1 tCount = 11 playerIsChatting = false chatRequestMode = false chatNotificationMode = false chatRequestedBy = "none" playerIsBusy = false newMessageArrived = false setElementData(getLocalPlayer(),"chattingWith","none") allowPersonalDetails = true allowStats = true soundMessage = true soundRequest = true showOnDeath = false useHunterSkin = false recentlySavedSettings = false customHorn = {} hornNum = 0 setHornSound = 0 acceptMode = 1 totalServerMaps = 0 totalDmMaps = 0 totalDdMaps = 0 screenWidth,screenHeight = guiGetScreenSize() mainWindowWidth = 619 mainWindowHeight = 365 PDWindowWidth = 369 PDWindowHeight = 370 CNWindowWidth = 340 CNWindowHeight = 123 SWindowWidth = 541 SWindowHeight = 274 chatImageSize = 135 SkinWindowWidth = 604 SkinWindowHeight = 429 colorWindowWidth = 405 colorWindowHeight = 195 end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),vars2) ------------ -- Userpanel ------------ -- Create achievements achievements = { "New kid in town", "Easy as", "Dominating", "Unstoppable", "FTW!", "Deathstalker", "Leveller - Rank I", "Leveller - Rank II", "Leveller - Rank III", "Leveller - Rank IV", "Levelling Champion", "Elite Leveller - Rank I", "Elite Leveller - Rank II", "Elite Leveller - Rank III", "Elite Levelling Champion", "Hunter magnet", "Master of disaster", "King of the sky", "My very own toptime", "Toptime expert", "Gaming spree", "All-time player", "Connect frenzy", "Climbing the ladder", "Money saver", "Blue-collar millionaire", "Colors are fun", "Pimp my ride", "Communicative gamer award", "Charity", "Glimpse of the future", "Centurion", "Milestone", "Millennium", "Socializer", "Speed writer", "Quick reflexes", "I care how I look", "Horn lover", "Achievement Hunter"} details = { "Join the server for the first time.", "Win on 10 maps.", "Win on 50 maps.", "Win on 100 maps.", "Win on 200 maps.", "Die 300 times.", "Reach level 5.", "Reach level 10.", "Reach level 15.", "Reach level 20.", "Reach level 25.", "Reach level 10 ELITE.", "Reach level 15 ELITE.", "Reach level 20 ELITE.", "Reach level 25 ELITE.", "Get 10 hunters.", "Get 50 hunters.", "Get 100 hunters.", "Set a top hunter time.", "Set 10 top hunter times.", "Play for 20 hours.", "Play for 50 hours.", "Join the server 40 times.", "Get a total of $10,000.", "Get a total of $100,000.", "Get a total of $1,000,000.", "Change your headlights color.", "Change your vehicle color.", "Start a chat with someone.", "Send some money to a player.", "Buy a next map.", "Play a total of 100 maps.", "Play a total of 500 maps.", "Play a total of 1000 maps.", "Update your personal details.", "Win 15 reaction tests.", "Win a reaction test in 5 seconds or less.", "Buy any skin from the shop.", "Buy any horn from the shop.", "Unlock all other achievements."} -- Create horns hornName={ "Default GTA horn", "Airhorn", "Clown", "Train", "Fog horn", "Submarine", "Military trumpet", "Mr. Whoopie"} hornPrice={ " N/A", " 2000", " 4000", " 6000", " 8000", " 10000", " 15000", " 20000"} hornSound={ "sounds/airhorn.wav", "sounds/clownhorn.mp3", "sounds/trainhorn.mp3", "sounds/cargoshiphorn.mp3", "sounds/submarinehorn.wav", "sounds/generalleehorn.mp3", "sounds/whoopiehorn.mp3"} function onPlayerResourceStart() -- Create all the tabs tabs = { guiCreateWindow(screenWidth/2-mainWindowWidth/2,screenHeight/2-mainWindowHeight/2,mainWindowWidth,mainWindowHeight,"WARNING! The userpanel has failed to load! Please contact NeXTreme as soon as possible!!",false), guiCreateWindow(screenWidth/2-mainWindowWidth/2,screenHeight/2-mainWindowHeight/2,mainWindowWidth,mainWindowHeight,"Players",false), guiCreateWindow(screenWidth/2-mainWindowWidth/2,screenHeight/2-mainWindowHeight/2,mainWindowWidth,mainWindowHeight,"Achievements",false), guiCreateWindow(screenWidth/2-mainWindowWidth/2,screenHeight/2-mainWindowHeight/2,mainWindowWidth,mainWindowHeight,"Shop",false), guiCreateWindow(screenWidth/2-mainWindowWidth/2,screenHeight/2-mainWindowHeight/2,mainWindowWidth,mainWindowHeight,"Maps",false), guiCreateWindow(screenWidth/2-mainWindowWidth/2,screenHeight/2-mainWindowHeight/2,mainWindowWidth,mainWindowHeight,"Options",false) } guiSetVisible(tabs[1],false) guiSetVisible(tabs[2],false) guiSetVisible(tabs[3],false) guiSetVisible(tabs[4],false) guiSetVisible(tabs[5],false) guiSetVisible(tabs[6],false) -- "Stats" TAB lblStats = guiCreateLabel(18,24,150,49,"Stats",false,tabs[1]) guiLabelSetColor(lblStats,255,130,0) guiLabelSetVerticalAlign(lblStats,"top") guiLabelSetHorizontalAlign(lblStats,"left",false) guiSetFont(lblStats,"sa-header") lblPlayerLevel = guiCreateLabel(18,83,136,15,"Level: N/A",false,tabs[1]) guiSetFont(lblPlayerLevel,"default-bold-small") lblPlayerStats = guiCreateLabel(18,201,84,16,"Player stats:",false,tabs[1]) guiLabelSetColor(lblPlayerStats,255,130,0) guiSetFont(lblPlayerStats,"default-bold-small") lblPlayerMoney = guiCreateLabel(18,98,151,14,"Money: N/A",false,tabs[1]) guiLabelSetColor(lblPlayerMoney,255,255,255) guiSetFont(lblPlayerMoney,"default-bold-small") lblAchievementsUnlocked = guiCreateLabel(18,126,180,14,"Achievements unlocked: 0/40",false,tabs[1]) guiSetFont(lblAchievementsUnlocked,"default-bold-small") lblTotalPlayingTime = guiCreateLabel(18,156,292,15,"Total playing time: N/A",false,tabs[1]) guiSetFont(lblTotalPlayingTime,"default-bold-small") lblNextLevelProgress = guiCreateLabel(335,131,232,45,"Progress to next level:",false,tabs[1]) guiLabelSetVerticalAlign(lblNextLevelProgress,"top") guiLabelSetHorizontalAlign(lblNextLevelProgress,"center",false) guiSetFont(lblNextLevelProgress,"default-bold-small") lblPlayerLevelRank = guiCreateLabel(388,45,124,22,"Loading...",false,tabs[1]) guiLabelSetColor(lblPlayerLevelRank,255,130,0) guiLabelSetVerticalAlign(lblPlayerLevelRank,"bottom") guiLabelSetHorizontalAlign(lblPlayerLevelRank,"center",false) guiSetFont(lblPlayerLevelRank,"default-bold-small") lblMapsWon = guiCreateLabel(18,242,205,15,"Maps won: N/A",false,tabs[1]) guiSetFont(lblMapsWon,"default-bold-small") lblTotalMapsPlayed = guiCreateLabel(18,227,205,15,"Total maps played: N/A",false,tabs[1]) guiSetFont(lblTotalMapsPlayed,"default-bold-small") lblWinRatio = guiCreateLabel(18,260,205,15,"Map win ratio: N/A",false,tabs[1]) guiSetFont(lblWinRatio,"default-bold-small") lblTotalHunters =
  5. hey all. i have a userpanel.. where players can find information,stats shops and buy maps..... Well @ the maps section.. It doesnt show anymaps to buy... And i don't know why.. Hope that 1 of you guy's know what the problem is? The scrips are here: main_client: -- "Maps" TAB gridMaps = guiCreateGridList(17,51,315,285,false,tabs[5]) guiGridListSetSortingEnabled(gridMaps,false) guiGridListAddColumn(gridMaps,"Map name",0.9) lblMapsInfo = guiCreateLabel(342,210,245,45,"You need to be level 2 or higher to set maps. Each map costs $5000, regardless whether it's DM or DD.",false,tabs[5]) guiLabelSetVerticalAlign(lblMapsInfo,"center") guiLabelSetHorizontalAlign(lblMapsInfo,"center",false) guiSetFont(lblMapsInfo,"default-bold-small") lblTotalMapsOnServer = guiCreateLabel(342,28,193,19,"Total maps on the server: N/A",false,tabs[5]) guiSetFont(lblTotalMapsOnServer,"default-bold-small") lblTotalDmMaps = guiCreateLabel(342,47,193,19,"Total DM maps: N/A",false,tabs[5]) guiSetFont(lblTotalDmMaps,"default-bold-small") lblTotalDdMaps = guiCreateLabel(342,62,193,19,"Total DD maps: N/A",false,tabs[5]) guiSetFont(lblTotalDdMaps,"default-bold-small") lblSetNextMapTitle = guiCreateLabel(342,189,245,16,"Set a next map",false,tabs[5]) guiLabelSetColor(lblSetNextMapTitle,255,120,0) guiLabelSetVerticalAlign(lblSetNextMapTitle,"center") guiLabelSetHorizontalAlign(lblSetNextMapTitle,"center",false) guiSetFont(lblSetNextMapTitle,"default-bold-small") lblSearchForMaps = guiCreateLabel(25,25,101,14,"Search for maps:",false,tabs[5]) guiLabelSetColor(lblSearchForMaps,255,120,0) guiLabelSetVerticalAlign(lblSearchForMaps,"center") guiSetFont(lblSearchForMaps,"default-bold-small") lblSelectedMapNameTitle = guiCreateLabel(342,97,245,16,"Selected map name:",false,tabs[5]) guiLabelSetColor(lblSelectedMapNameTitle,150,255,150) guiSetFont(lblSelectedMapNameTitle,"default-bold-small") lblSelectedMapAuthorTitle = guiCreateLabel(342,136,245,16,"Map type:",false,tabs[5]) guiLabelSetColor(lblSelectedMapAuthorTitle,150,255,150) guiSetFont(lblSelectedMapAuthorTitle,"default-bold-small") lblSelectedMapName = guiCreateLabel(342,113,245,16,"N/A",false,tabs[5]) lblSelectedMapAuthor = guiCreateLabel(342,152,245,16,"N/A",false,tabs[5]) lblMapTabLine1 = guiCreateLabel(342,309,245,27,"---------------------------------------------------------------",false,tabs[5]) guiLabelSetColor(lblMapTabLine1,255,120,0) guiLabelSetVerticalAlign(lblMapTabLine1,"center") guiLabelSetHorizontalAlign(lblMapTabLine1,"center",false) guiSetFont(lblMapTabLine1,"default-bold-small") lblMapTabLine2 = guiCreateLabel(342,173,245,16,"---------------------------------------------------------------",false,tabs[5]) guiLabelSetColor(lblMapTabLine2,255,120,0) guiLabelSetVerticalAlign(lblMapTabLine2,"center") guiLabelSetHorizontalAlign(lblMapTabLine2,"center",false) guiSetFont(lblMapTabLine2,"default-bold-small") lblMapTabLine3 = guiCreateLabel(342,81,245,16,"---------------------------------------------------------------",false,tabs[5]) guiLabelSetColor(lblMapTabLine3,255,120,0) guiLabelSetVerticalAlign(lblMapTabLine3,"center") guiLabelSetHorizontalAlign(lblMapTabLine3,"center",false) guiSetFont(lblMapTabLine3,"default-bold-small") editMapSearch = guiCreateEdit(129,23,198,21,"",false,tabs[5]) btnBuyNextMap = guiCreateButton(380,265,169,44,"Buy as next map - $5000",false,tabs[5]) main server: -- Buy a next map function buyMap(thePlayer,mapName) local playerLevel = tonumber(loadPlayerData(thePlayer,"level")) local playerCash = tonumber(loadPlayerData(thePlayer,"cash")) if mapIsAlreadySet == false then if not (mapName == "") then if playerLevel >= mapLevel then if playerCash >= mapCost then triggerEvent("onExternalNextmapRequest",thePlayer,thePlayer,mapName) else outputChatBox("#0000ff* #FFFFFFYou don't have enough money to set a map!",thePlayer,255,255,255,true) end else outputChatBox("#0000ff* #FFFFFFYou need to be level #ABCDEF"..mapLevel.." #FFFFFFor higher to set maps!",thePlayer,255,255,255,true) end else outputChatBox("#0000ff* #FFFFFFPlease select a map from the list first!",thePlayer,255,255,255,true) end else outputChatBox("#0000ff* #FFFFFFA map is already set at the moment! Please try again later.",thePlayer,255,255,255,true) end end function resetMapSetStatus() mapIsAlreadySet = false end addEventHandler("onMapStarting",getRootElement(),resetMapSetStatus) addEvent("onScriptSetNextMap",true) addEventHandler("onScriptSetNextMap",getRootElement(), function (mapName) thePlayer = source local playerCash = tonumber(loadPlayerData(thePlayer,"cash")) savePlayerData(thePlayer,"cash",playerCash-mapCost) outputChatBox("#FFFFFFNextmap: "..getPlayerName(thePlayer).."#FFFFFF has bought a next map!",getRootElement(),255,255,255,true) outputChatBox("#FFFFFFNextmap: #FF8800"..mapName,getRootElement(),255,255,255,true) mapIsAlreadySet = true scoreboardRefresh(thePlayer) achievement31(thePlayer) end) addEvent("onRaceSetNextMap",true) addEventHandler("onRaceSetNextMap",getRootElement(), function () mapIsAlreadySet = true end)
  6. You can find the script @ the top of the page.
  7. This is the line : kickPlayer(player,"AFK")
  8. first thanks for trying me to help with this! i did what you said. But it's still not working.. still get the same message in the console : ( main_server.lua"2537: bad argument @ "kickPlayer: ) Dont know what's wrong with that line! any other idea's maby change the line?
  9. You mean the meta file? Or the whole file of the script of main server and main client?
  10. Hey all I got a afk script, but after it shows in the chat that the player is been warned for [3/3] He needs to be kicked out the server. but my script won't let that happen, in the server its sais: " acces denied @ "kickplayer" But i don't see a mistake. Hope that 1 of you guys can help me out what the problem is? Scripts: Main_server ---------------------------------------------- -- AFK killer - extended from clienside script ---------------------------------------------- local raceState = "" local enableMessages = true local messageColor = "#98F5FF" function afkMsg(mtype,afkCount) if(mtype == 1) then outputChatBox("#0000ff* #FFFFFF".. getPlayerName(source).. "#0000ff has been killed by the #FFFFFFAFK killer#0000ff #0000ff[#98F5FF"..afkCount.."/3#0000ff]",getRootElement(),255,255,255,true) elseif(mtype == 2) then outputChatBox("#0000ff* #FFFFFF".. getPlayerName(source).. "#0000ff has been kicked for staying #FFFFFFAFK#0000ff for 3 rounds!",getRootElement(),255,255,255,true) end end addEvent( "afkWarn", true ) addEventHandler( "afkWarn", getRootElement(), afkMsg) function afkKill() local thePlayer = source callClientFunction(thePlayer,"setKBA",thePlayer) setElementHealth(source, 0) end addEvent( "afkSlap", true ) addEventHandler( "afkSlap", getRootElement(), afkKill) function changeRaceState(newStateName) raceState = newStateName end addEvent("onRaceStateChanging", true) addEventHandler( "onRaceStateChanging", getRootElement(), changeRaceState) function afkKick(player) kickPlayer(player,"AFK") end Main_client ------------- -- AFK killer ------------- local MaxAFKtime = 30 local warnTime = 20 local v = 0 local AFKtime = 0 local sx,sy = guiGetScreenSize() local wEvent = false function rWarn() dxDrawImage( sx/2 - 300, sy/2 - 100, 600, 200, "img/warn.png") dxDrawText("You will be killed in "..tostring(tCount).." seconds",sx/2 - 255, sy/2 + 45,sx,sy,tocolor(0,222,222,222),1.01,"bankgothic") end function stopWarn() if(wEvent) then removeEventHandler("onClientRender", getRootElement(), rWarn) wEvent = false end end function imgHandler() stopWarn() end addEventHandler("onClientPlayerWasted",getLocalPlayer(),imgHandler) function checkMain() if isPedInVehicle ( getLocalPlayer() ) then aTimeAdd() end end function aTimeAdd() AFKtime = AFKtime + 1 local isFinished = getElementData ( getLocalPlayer(), "dead") if(isElementFrozen ( getPedOccupiedVehicle ( getLocalPlayer() )) and isFinished == false) then aTimeClear() end local isNew = getElementData (getLocalPlayer(), "state") if isNew == "waiting" or isNew == "dead" then aTimeClear() end if(getPedOccupiedVehicle ( getLocalPlayer() ) ~= false) then local player = getLocalPlayer() if(AFKtime >= MaxAFKtime) then if (afkCounter <= 2) then triggerServerEvent ( "afkWarn", player, 1, afkCounter) afkCounter = afkCounter+1 triggerServerEvent ( "afkSlap", player) stopWarn() elseif (afkCounter > 2) then triggerServerEvent ( "afkWarn", player, 1, afkCounter) triggerServerEvent ( "afkWarn", player, 2) afkCounter = 1 triggerServerEvent ( "afkKick", player, 3,player) end elseif(AFKtime >= warnTime) then tCount = tCount - 1 if(not wEvent) then addEventHandler("onClientRender", getRootElement(), rWarn) wEvent = true end end end end setTimer ( checkMain, 1000, -1) function aTimeClear() AFKtime = 0 tCount = 11 stopWarn() end bindKey("accelerate","down",aTimeClear) bindKey("vehicle_left","down",aTimeClear) bindKey("vehicle_right","down",aTimeClear) bindKey("brake_reverse","down",aTimeClear) function onClientLoaded(res) triggerServerEvent("onClientLoaded",getLocalPlayer()) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),onClientLoaded) function loadSettings(maxtime, wtime ) MaxAFKtime = tonumber(maxtime) warnTime = tonumber(wtime) end addEvent( "onSettingsReady", true ) addEventHandler( "onSettingsReady", getRootElement(), loadSettings ) function setKBA(thePlayer) killedByAfk = 1 end function getKBA(thePlayer) if killedByAfk == 0 then thePlayer = getLocalPlayer() callServerFunction("earnMoney", thePlayer) end end function deathReset() if killedByAfk == 0 then afkCounter = 1 else end end addEventHandler("onClientPlayerWasted",getLocalPlayer(),deathReset) function resetKBA() killedByAfk = 0 end
×
×
  • Create New...