Jump to content

justn

Members
  • Posts

    525
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by justn

  1. Still doesn't work :c
  2. Ah here's my full code.. the only part which doesn't work is the saving part: CODE REMOVED SO PLAYERS CANNOT STEAL
  3. I know it's server-sided, there's only a server-side in the entire script and there's No errors and it still doesn't work.. should I just set the account data when the player sets his SuperNick ?
  4. Hi there, I'm working on a supernick script... and I have a problem with it.. so the problem is.. when i leave the server.. with my supernick.. and i join and login again.. it doesn't set my supernick again.. code: CODE REMOVED SO PLAYERS CANNOT STEAL
  5. justn

    Help please ^.^

    Hey guys, not sure If I posted this in the right place but.. how do I manually change my server's version ? It's currently 1.4 and i wanna change it to 1.3
  6. @Sam1ler When i add it and stuff. the map just starts but player never spawns or anything like that @HUNTERIX All is already set to none
  7. Hi what I'd like to know is, when a race map starts, to check if it has respawn and if it does, then remove respawn so when players die, they wont come back ? :3 ty
  8. justn

    VoteRedo Help #2

    Yea.. but if there is 1 player in the server.. ?
  9. Hey guys, So I made a voteredo script, and there's 1 small thing I need help with, so, when there's 3 player in a server. and 1 player does vr.. it says "[VR] playerName has voted for redo [1/1.5]" but If there's 3 player in server.. i want it to say "[VR] playerName has voted for redo [1/2]" Examples -- If 5 players in server it should say "[VR] playerName has voted for redo [1/4]" and not [1/2.5] -- If 7 players in server it should say "[VR] playerName has voted for redo [1/6]" and not [1/3.5] Anyways, you know what I mean, hope someone can help thanks Code: -addCommandHandler( "vr", function( player ) local alivePlayers = getAlivePlayers() if #alivePlayers ~= 0 then if ( isMapRestarted == false ) then if playerVotes[player] then return outputChatBox(serverColor.."[VR]: #ffffffYou have already voted", player, 255, 0, 0, true) end playerVotes[player] = true nbVotes = nbVotes + 1 local playerCount = getPlayerCount() if nbVotes-1 < (playerCount/2) then if (playerCount == 1) or (playerCount == 2) then outputChatBox("", root, 255, 0, 0, true) outputChatBox(serverColor.."[VR]: "..getPlayerName(player).."#ffffff has voted for redo! ["..serverColor..nbVotes.."/1#FFFFFF]", root, 255, 0, 0, true) outputChatBox("", root, 255, 0, 0, true) outputChatBox(serverColor.."[VR]: #ffffffThis map will be restarted by vote!", root, 255, 0, 0, true) addEventHandler("onMapStarting",root,onFirstMapStarting) if not onPlayerPickUpRacePickupHandler then onPlayerPickUpRacePickupHandler = addEventHandler("onPlayerPickUpRacePickup",root,onPlayerHitHunter) -- if the addEventHandler was successfully executed, it will return true else false. In the variable onPlayerPickUpRacePickupHandler. end if not onPlayerWastedHandler then onPlayerWastedHandler = addEventHandler("onPlayerWasted",root,onPlayerWasted) -- if the addEventHandler was successfully executed, it will return true else false. In the variable onPlayerWastedHandler. end if isTimer(resetVotesTimer) then -- anti flow killTimer(resetVotesTimer) end return end outputChatBox("", root, 255, 0, 0, true) outputChatBox(serverColor.."[VR]: "..getPlayerName(player).."#ffffff has voted for redo! ["..serverColor..nbVotes.."/"..(getPlayerCount()/2).."#FFFFFF]", root, 255, 0, 0, true) end if nbVotes >= ((playerCount)/2) then outputChatBox("", root, 255, 0, 0, true) outputChatBox(serverColor.."[VR]: #ffffffThis map will be restarted by vote!", root, 255, 0, 0, true) addEventHandler("onMapStarting",root,onFirstMapStarting) if not onPlayerPickUpRacePickupHandler then onPlayerPickUpRacePickupHandler = addEventHandler("onPlayerPickUpRacePickup",root,onPlayerHitHunter) -- if the addEventHandler was successfully executed, it will return true else false. In the variable onPlayerPickUpRacePickupHandler. end if not onPlayerWastedHandler then onPlayerWastedHandler = addEventHandler("onPlayerWasted",root,onPlayerWasted) -- if the addEventHandler was successfully executed, it will return true else false. In the variable onPlayerWastedHandler. end if isTimer(resetVotesTimer) then -- anti flow killTimer(resetVotesTimer) end resetVotesTimer = setTimer(resetVotes, 150*1000, 1) -- I put this function a both, because then you don't have to create a function over and over. else --outputChatBox("", root, 255, 0, 0, true) --outputChatBox("#ffb717[REDO]: "..getPlayerName(player).." #ffffffvoted for redo! [#FFB818"..nbVotes.."/"..(getPlayerCount()/2).."#FFFFFF]", root, 255, 0, 0, true) end else outputChatBox(serverColor.."[VR]: #ffffffMap is already restarted !", player, 255, 0, 0, true) end else outputChatBox(serverColor.."[VR]: #ffffffMap is already finished", player, 255, 0, 0, true) end end)
  10. justn

    VoteRedo Help #1

    Never really thought of that... eh, thanks
  11. Hey guys, so i made a voteredo script, but there's 1 small thing I need help with, when the player does /vr and it says 'map will be restarted' etc.. how do i make, when the map is restarted.. and the players try to do vr again.. it says 'Map is already restarted by voteredo' and then when the next map starts, the players can do /vr again .. ? ;P My code: CODE REMOVED -- Don't even try to steal it
  12. If it's a stolen one, then you can forget about it.
  13. justn

    Bug Problem

    It works ! Ty, but 1 last thing. How do I check if a team has no players, then the team won't show in scoreboard, and let's say, if a player joins the server, and he gets set to the team. then the teams will show in scoreboard.. ?
  14. justn

    Bug Problem

    Now, it only works for -|SxG|- team.. i want it to work for all the teams in the table
  15. Try this addCommandHandler ('equipertaser', function ( ) if (getTeamName(getPlayerTeam(source)) == "Police") then giveWeapon ( source, 23, 700 ) outputChatBox("Vous vous êtes equipé du Taser !",source, 255, 255, 0 ) end end )
  16. justn

    Bug Problem

    I tried this code below, it works. but, when the player puts -|SxG|- on his name, he doesn't get set to the team, but when he puts |PaS| he does.. can u help me with this problem ? local Table = { {"-|SxG|-","-|SxG|- Skilled Xtreme Gamers",255,155,0}, {"|PaS|","|PaS| Pro Adventure Skills",23,56,89}, } function setTeam2(old,new) for i,v in ipairs(Table) do if new then if string.find(new, v[1]) then --built-in string function if team then setPlayerTeam(source, getTeamFromName(v[2])) end else setPlayerTeam(source,nil) end end end end addEventHandler("onPlayerChangeNick",root,setTeam2)
  17. justn

    Bug Problem

    Bug.. If my name contains -|SxG|- and i change it to something else like "TEST" then i get set to the team.
  18. justn

    Bug Problem

    Hi, so I have this script so when the player changes his name and if his new name contains '-|SxG|-' then his team will be set. But the thing is, most of the time when the player changes his name and it doesnt contain -|SxG|- he still gets set to the team. Code: function setTeam2(old,new) if old then if new then local name = getPlayerFromPartialName("-|SxG|-") if name then if team then setPlayerTeam(source,getTeamFromName("-|SxG|- Skilled Xtreme Gamers")) end else setPlayerTeam(source,nil) end end end end addEventHandler("onPlayerChangeNick",root,setTeam2)
  19. justn

    Question

    Okay, thanks.
  20. justn

    Question

    Hi , is there a function to set next map in a running gamemode ? I can't find any.. Anyways if yes then please tell me, thanks !
  21. As far as I know, no one will make those scripts for you for free, as almost every is busy with their own project, but hopefully , you will find someone (maybe), You should try learning scripting https://wiki.multitheftauto.com/wiki/Main_Page
  22. https://wiki.multitheftauto.com/wiki/Sc ... troduction
×
×
  • Create New...