ali Posted September 19, 2012 Share Posted September 19, 2012 marker = createMarker( -2347.7023925781, -1638.6910400391, 483.703125, "cylinder", 2, 255, 255, 255, 255 ) function createTeamsOnStart () teamwinner = createTeam ( "winner", 225, 0, 225 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) function idc( player ) setPlayerTeam ( player, teamwinner ) givePlayerMoney( player, 5000 ) outputChatBox("A Player has reached to the marker and earned 5000$ win 10 in a row and get spacial prize") end addEventHandler("onMarkerHit",marker, idc) i want to add a tab of winning in the tab panel and also the win in 10 in a row plz help Link to comment
scratcher911 Posted September 19, 2012 Share Posted September 19, 2012 what tab panel ? You mean scoreboard ? Link to comment
ali Posted September 19, 2012 Author Share Posted September 19, 2012 what tab panel ? You mean scoreboard ? yes Link to comment
Castillo Posted September 19, 2012 Share Posted September 19, 2012 marker = createMarker ( -2347.7023925781, -1638.6910400391, 483.703125, "cylinder", 2, 255, 255, 255, 255 ) function createTeamsOnStart ( ) teamwinner = createTeam ( "winner", 225, 0, 225 ) exports [ "scoreboard" ]:scoreboardAddColumn ( "wins" ) end addEventHandler ( "onResourceStart", resourceRoot, createTeamsOnStart ) function idc ( player ) local currentWins = getElementData ( player, "wins" ) or 0 setElementData ( player, "wins", currentWins + 1 ) setPlayerTeam ( player, teamwinner ) givePlayerMoney ( player, 5000 ) outputChatBox ( "A Player has reached to the marker and earned 5000$ win 10 in a row and get spacial prize" ) end addEventHandler ( "onMarkerHit", marker, idc ) Link to comment
ali Posted September 19, 2012 Author Share Posted September 19, 2012 (edited) marker = createMarker ( -2347.7023925781, -1638.6910400391, 483.703125, "cylinder", 2, 255, 255, 255, 255 ) function createTeamsOnStart ( ) teamwinner = createTeam ( "winner", 225, 0, 225 ) exports [ "scoreboard" ]:scoreboardAddColumn ( "wins" ) end addEventHandler ( "onResourceStart", resourceRoot, createTeamsOnStart ) function idc ( player ) local currentWins = getElementData ( player, "wins" ) or 0 setElementData ( player, "wins", currentWins + 1 ) setPlayerTeam ( player, teamwinner ) givePlayerMoney ( player, 5000 ) outputChatBox ( "A Player has reached to the marker and earned 5000$ win 10 in a row and get spacial prize" ) end addEventHandler ( "onMarkerHit", marker, idc ) thanks but i have also more problems 1) i want to make if somebody else enters the marker the last winner's win go to zero 2)when player enters marker everyone dies 3)When he makes 10 in a row he gets a $50,000 if you can help me by adding it or giving a wiki links of which i can learn these kind of thing i will be grateful thanks again Edited September 19, 2012 by Guest Link to comment
ali Posted September 19, 2012 Author Share Posted September 19, 2012 marker = createMarker ( -2347.7023925781, -1638.6910400391, 483.703125, "cylinder", 2, 255, 255, 255, 255 ) function createTeamsOnStart ( ) teamwinner = createTeam ( "winner", 225, 255, 225 ) teamplayer = createTeam ( "player", 225, 255, 225 ) exports [ "scoreboard" ]:scoreboardAddColumn ( "wins" ) end addEventHandler ( "onResourceStart", resourceRoot, createTeamsOnStart ) function idc ( player ) local currentWins = getElementData ( player, "wins" ) or 0 setElementData ( player, "wins", currentWins + 1 ) setPlayerTeam ( player, teamwinner ) givePlayerMoney ( player, 5000 ) outputChatBox ( "A Player has reached to the marker and earned 5000$ win 10 in a row and get spacial prize" ) end addEventHandler ( "onMarkerHit", marker, idc ) function idk( player ) setPlayerTeam ( player, teamplayer ) end addEventHandler("onMarkerLeave",marker, idk) i have added these also plz solve the problems mentioned in my above post Link to comment
ali Posted September 20, 2012 Author Share Posted September 20, 2012 (edited) Problems Solved 1)i want to make if somebody else enters the marker the last winner's win go to zero 2)when player enters marker everyone dies 3)When he makes 10 in a row he gets a $50,000 Edited September 20, 2012 by Guest Link to comment
Castillo Posted September 20, 2012 Share Posted September 20, 2012 marker = createMarker ( -2347.7023925781, -1638.6910400391, 483.703125, "cylinder", 2, 255, 255, 255, 255 ) winner = false function createTeamsOnStart ( ) teamwinner = createTeam ( "winner", 225, 255, 225 ) teamplayer = createTeam ( "player", 225, 255, 225 ) exports [ "scoreboard" ]:scoreboardAddColumn ( "wins" ) end addEventHandler ( "onResourceStart", resourceRoot, createTeamsOnStart ) function idc ( player ) if ( winner and isElement ( winner ) ) then setElementData ( winner, "wins", 0 ) end winner = player local currentWins = getElementData ( player, "wins" ) or 0 setElementData ( player, "wins", currentWins + 1 ) setPlayerTeam ( player, teamwinner ) givePlayerMoney ( player, 5000 ) outputChatBox ( "A Player has reached to the marker and earned 5000$ win 10 in a row and get spacial prize" ) for _, player in ipairs ( getElementsByType ( "player" ) ) do killPed ( player ) end end addEventHandler ( "onMarkerHit", marker, idc ) function idk ( player ) setPlayerTeam ( player, teamplayer ) end addEventHandler ( "onMarkerLeave",marker, idk ) That? Link to comment
ali Posted September 20, 2012 Author Share Posted September 20, 2012 marker = createMarker ( -2347.7023925781, -1638.6910400391, 483.703125, "cylinder", 2, 255, 255, 255, 255 ) winner = false function createTeamsOnStart ( ) teamwinner = createTeam ( "winner", 225, 255, 225 ) teamplayer = createTeam ( "player", 225, 255, 225 ) exports [ "scoreboard" ]:scoreboardAddColumn ( "wins" ) end addEventHandler ( "onResourceStart", resourceRoot, createTeamsOnStart ) function idc ( player ) if ( winner and isElement ( winner ) ) then setElementData ( winner, "wins", 0 ) end winner = player local currentWins = getElementData ( player, "wins" ) or 0 setElementData ( player, "wins", currentWins + 1 ) setPlayerTeam ( player, teamwinner ) givePlayerMoney ( player, 5000 ) outputChatBox ( "A Player has reached to the marker and earned 5000$ win 10 in a row and get spacial prize" ) for _, player in ipairs ( getElementsByType ( "player" ) ) do killPed ( player ) end end addEventHandler ( "onMarkerHit", marker, idc ) function idk ( player ) setPlayerTeam ( player, teamplayer ) end addEventHandler ( "onMarkerLeave",marker, idk ) That? yes thank you very much ive learned alot Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now