Jump to content

DePemy

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by DePemy

  1. So somehow my voteredo doesnt work with the current gamemode i have.. Any clues? I really have no idea where to start... --- VR --- mapRestarted = true cRedo = false playersTable = {} playersVoted = 0 vrColor = "#FF4400" VoteRedo = true function tableFind(tabela,value) local ifIs = false for i,data in pairs(tabela) do if data == value then ifIs = true break end end return ifIs end addCommandHandler("forceredo", function(player) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then cRedo = true outputChatBox ("[#FF4400Voteredo#FFFFFF] an Admin forced a redo. Map will be restarted", getRootElement(), 255, 255, 255, true ) end end) --function PlayerForceRedo(thePlayer) -- cRedo = true -- outputChatBox ("[sERVER] an Admin forced a redo. Map will be restarted", getRootElement(), 255, 255, 255, true ) --end function PlayerVoted(thePlayer) if VoteRedo then if mapRestarted then if playersVoted < math.floor(getPlayerCount() /2 + 0.5) then if not tableFind(playersTable, getElementData(thePlayer,"hisNick")) then table.insert(playersTable, getElementData(thePlayer,"hisNick")) playersVoted = playersVoted + 1 if playersVoted >= math.floor(getPlayerCount() /2 + 0.5) then vrColor = "#FF4400" end outputChatBox("[#FF4400Voteredo#FFFFFF] ' "..getPlayerNametagText(thePlayer).." #FFFFFF' has voted for redo | "..vrColor.."["..playersVoted.."/".. math.floor(getPlayerCount() /2 + 0.5) .."]", root, 255, 255,255, true) if playersVoted >= math.floor(getPlayerCount() /2 + 0.5) then cRedo = true outputChatBox ("[#FF4400Voteredo#FFFFFF] This map will be restarted by #FF4400Vote", root, 255, 255, 255, true) end else outputChatBox("[#FF4400Voteredo#FFFFFF] #FfffffYou already Voted for a redo !", thePlayer, 255, 255, 255, true) end else outputChatBox ("[#FF4400Voteredo#FFFFFF] This map will be already restarted by #FF4400Vote", thePlayer, 255, 255, 255, true) end else outputChatBox("[#FF4400Voteredo#FFFFFF] #FF0000Sorry, This map was restarted by Vote !", thePlayer, 255, 255, 255, true) end else outputChatBox("[#FF4400Voteredo#FFFFFF] #FF0000Sorry, VoteRedo System disabled for 3 minutes!", thePlayer,255,255,255,true) end end addCommandHandler ( "vr", PlayerVoted ) addCommandHandler ( "voteredo", PlayerVoted ) --addCommandHandler ( "forceredo", PlayerForceRedo ) ------ addEvent("onRaceStateChanging",true) addEventHandler("onRaceStateChanging",root, function(newStateName) if newStateName == "LoadingMap" then table.remove(playersTable) vrColor = "#FF4400" playersVoted = 0 end end) ------ addEventHandler("onPlayerJoin",root, function() setElementData(source,"hisNick",getPlayerName(source)) end) ---- addCommandHandler("kickall", function(player) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then for t,p in ipairs (getElementsByType("player")) do kickPlayer(p,getPlayerName(player)..": please all come again \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />") end end end) ---- addCommandHandler("turnVR", function(player) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if VoteRedo then VoteRedo = false cRedo = false outputChatBox("[#FF4400Voteredo#FFFFFF] ' "..getPlayerNametagText(player).." #FFFFFF' #FF0000has disabled VoteRedo System!",root,255,255,255,true) else VoteRedo = true outputChatBox("[#FF4400Voteredo#FFFFFF] ' "..getPlayerNametagText(player).." #FFFFFF' #FF4400has enabled VoteRedo System!",root,255,255,255,true) end end end)
  2. DePemy

    Image placing

    Ah i see, now i have encountered the following problem. For my screen it is good. But when i ask some other players, it says they see it half.. How can i make this responsive like a website has? This is what i see : http://i62.tinypic.com/2mcye6v.png This is what an other guy sees: http://i58.tinypic.com/5334pk.png Hopefully you can help me out
  3. DePemy

    Image placing

    Very good. Altought my logo is very small now, and when i change the size, the positions isnt right again.. I understand what you said, but how can i figure out what the position number is? Now you used -100 . How do you know this?
  4. DePemy

    Image placing

    So, i wanted to make a custom Time Passed image with logo. But somehow i cant get the position right.. Anyone who can help me out? Thanks in advance. Code : function showClientImage() guiCreateStaticImage( 1920, 1080, 100, 100, "logo1.png", false ) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), showClientImage )
  5. And again still doesnt work.. Isnt it supposed to be something like this? for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end
  6. Uh nope, the gsub buggs it all..
  7. Hey guys, So a couple months ago I made an ignore script, altought it has some bugs with it, I was wondering if you guys can help me out with it.. The ignoring thing works great, but the problem is that i have to enter to CORRECT name of the player, that's with the color codes included. Is there any way to fix this? I would really appreciate any help! Here's the code. Code removed against copy-cats Please help me out Kind regards, Remy
  8. Hello friends! I was wondering if there is a way to change the custom player kicked, player banned and player muted message.. My idea is to make it something like this : Player .... Kicked by .... Reason : .... Same goes for ban, mute and unmute.. Hope you guys can help out! Kind Regards! Remy
  9. Made a META.XML .. Tried it.. Nothing happend. Tried to add it in Admin ACL. Nothing happend.. Got any clues? It would be really awsome!
  10. So, I was wondering. Recently, i got some really annoying fightings going on in my server. I later talked to both of the guys and noticed that one of them had some real issues with himself. He really wanted to ignore the guy, but since he can read the chat. He wasn't able to do so.. My question: Is there any ignore script or something (not mute) available as a resource? I would be really happy and this would solve a lot of problems. If someone wants to script it if it's not done yet, i might want to talk about paying. Well.. Atleast if you explain the script to me because i would love to learn how to do that.. Hope you guys can help me out! Kind Regards!
  11. Hello People! I recently started my own server, and i try to script my own as much as possible. But since i am a student of Graphic Design, it is hard to figure everything out on my own.. I want to have a nice scoreboard wich contains Servername (wich is in on default if I'm correct), Money/Cash, Rank, Status, Country (with flag if possible) and ping. I tried a couple of things, but didn't manage to get the job done. Is there anyone here who could help me with this (for free) or can send me some tutorial links? Or just show me the script ofcourse . Hopefully you guys can help me out! Thank you! Kind Regards, Remy PS; Sorry for my grammar mistakes. Im not english
×
×
  • Create New...