Jump to content

^Dev-PoinT^

Members
  • Posts

    313
  • Joined

  • Last visited

Everything posted by ^Dev-PoinT^

  1. when i spawn it say what team i moved To
  2. i just Made this now function me () local team = getPlayerTeam ( source ) if ( team ) then triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(),teamName) end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), me )
  3. i swear i made it
  4. its work to https://wiki.multitheftauto.com/wiki/SetCameraViewMode
  5. addEventHandler("onClientPlayerJoin", getLocalPlayer(), function() setCameraViewMode(0) end) viewMode: The view mode you wish to use 0: Bumper 1: Close external 2: Middle external 3: Far external 4: Low external 5: Cinematic
  6. this is the code only i stop on this
  7. --------- bad argument @ 'getTeamFromName, bad argument @ 'getTeamName,@ -------
  8. Hi i have problem with Trigring see client triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(),) server addEvent ( "onPlayerChooseTeam" , true ) addEventHandler ( "onPlayerChooseTeam" , root , function ( teamName ) local team = getTeamFromName ( teamName ) setPlayerTeam ( source , team ) outputChatBox("You have successfully choosed "..getTeamName(team).." team.", resPlayer, root, 255, 255, 0) end )
  9. your welcome.
  10. try This local weapons = { {fileName="ak47", model=355},{fileName="colt", model=346}, {fileName="m4", model=356},{fileName="magnum", model=348}, {fileName="mp5", model=353},{fileName="shotgun", model=349}, {fileName="sniper", model=358},{fileName="spaz", model=350} } function load() for index, weapon in pairs(weapons) do txd = engineLoadTXD ( weapon.fileName.. "skins/.txd" ) engineImportTXD ( txd, weapon.model ) dff = engineLoadDFF ( weapon.fileName.. "skins/.dff", 0 ) engineReplaceModel ( dff, weapon.model ) end end addEventHandler("onClientResourceStart",resourceRoot, function () local version = getVersion() if version.mta == "1.1.1" then setTimer ( load, 1000, 1) end end)
  11. ^Dev-PoinT^

    help me

    post Your Meta and your code
  12. ok Thx Man work Fine
  13. removeCommandHandler("Kill")
  14. Thxxxxxxxx For all and Big Thx For BinSlayer1 thx i start the script and i didnt reconnect lol thx sloved
  15. Back! i start it dont outputChatBox .. and i use admin Panel to setTeam and it set me P.S iam runing it with utf-witout Bom
  16. Tapl see what he say ======= teams.lua:3: Bad argument @' countPlayersInTeam teams.lua:3: Bad argument @' getTeamName attempt to index a boolean value ========= soldSnake14 dos not setThe Team see the Pic
  17. no thing and debguscript nothing To how about use getElementByType (team)? teamRed = createTeam ( "Red", 255, 0, 0 ) teamBlue = createTeam ( "Blue", 0, 0, 255 ) function balanceTeams ( ) local RedCount = countPlayersInTeam ( teamBlue ) local BlueCount = countPlayersInTeam ( teamRed ) if RedCount ~= BlueCount then if RedCount > BlueCount then setPlayerTeam ( source , teamBlue ) elseif RedCount < BlueCount then setPlayerTeam ( source , teamRed ) end outputChatBox ( "You've been moved to the "..getTeamName ( getPlayerTeam ( source ) ):lower ( ).." team!", source ) ouputChatBox ( "teamBlue: ".. tostring ( teamBlue ).. "; teamRed: ".. tostring ( teamRed) ) end end addEventHandler ( "onPlayerJoin", getRootElement ( ), balanceTeams )
  18. no erros but its dont set me in any Team and i see the team function but its dont work to
  19. the teams are show but setTeam is the problem
  20. dos not work
  21. you mean like this ? function createTeamsOnStart () teamRed = createTeam ( "Red", 255, 0, 0 ) teamBlue = createTeam ( "Blue", 0, 0, 255 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) function balanceTeams () local RedTeam = getTeamFromName ( "Red" ) local BlueTeam = getTeamFromName ( "Blue" ) local RedCount = countPlayersInTeam ( RedTeam ) local BlueCount = countPlayersInTeam ( BlueTeam ) if not RedCount == BlueCount then if RedCount > BlueCount then setPlayerTeam ( source , teamBlue ) outputChatBox("You've been moved to the blue team!", source) elseif RedCount < BlueCount then setPlayerTeam ( source , teamRed ) outputChatBox("You've been moved to the red team!", source) end end end addEventHandler ( "onPlayerJoin", getRootElement(), balanceTeams )
  22. thx its say 'end' expected(to close 'function' at line 7 near '' function createTeamsOnStart () teamRed = createTeam ( "Red", 255, 0, 0 ) teamBlue = createTeam ( "Blue", 0, 0, 255 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) function balanceTeams ( thePlayer, source ) local RedTeam = getTeamFromName ( "Red" ) local BlueTeam = getTeamFromName ( "Blue" ) local RedCount = countPlayersInTeam ( RedTeam ) local BlueCount = countPlayersInTeam ( BlueTeam ) if not RedCount == BlueCount then if RedCount > BlueCount then setPlayerTeam ( source , teamBlue ) outputChatBox("You've been moved to the blue team!", thePlayer) elseif RedCount < BlueCount then setPlayerTeam ( source , teamRed ) outputChatBox("You've been moved to the red team!", thePlayer) end end addEventHandler ( "onPlayerJoin", getRootElement(), balanceTeams )
  23. i see this on mta wiki Teams functions its say (thePlayer) i made this and did not work function createTeamsOnStart () teamRed = createTeam ( "Red", 255, 0, 0 ) teamBlue = createTeam ( "Blue", 0, 0, 255 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) function balanceTeams ( source ) local RedTeam = getTeamFromName ( "Red" ) local BlueTeam = getTeamFromName ( "Blue" ) local RedCount = countPlayersInTeam ( RedTeam ) local BlueCount = countPlayersInTeam ( BlueTeam ) local source = getLocalPlayer() if RedCount == BlueCount then setPlayerTeam ( source , RedTeam ) elseif RedCount > BlueCount then setPlayerTeam ( source , BlueTeam ) elseif RedCount < BlueCount then setPlayerTeam ( source , RedTeam ) end end addEventHandler ( "onPlayerJoin", getRootElement(), balanceTeams )
  24. i fix it but its dont set me in any team function createTeamsOnStart () teamRed = createTeam ( "Red", 255, 0, 0 ) teamBlue = createTeam ( "Blue", 0, 0, 255 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) function balanceTeams ( thePlayer ) local RedTeam = getTeamFromName ( "Red" ) local BlueTeam = getTeamFromName ( "Blue" ) local RedCount = countPlayersInTeam ( RedTeam ) local BlueCount = countPlayersInTeam ( BlueTeam ) if RedCount == BlueCount then setPlayerTeam ( thePlayer , RedTeam ) elseif RedCount > BlueCount then setPlayerTeam ( thePlayer , BlueTeam ) elseif RedCount < BlueCount then setPlayerTeam ( thePlayer , RedTeam ) end end
  25. i well try fix it
×
×
  • Create New...