
Avagard
Members-
Posts
65 -
Joined
-
Last visited
Everything posted by Avagard
-
thanks for the answer but, that is not what i wanted to do... i want to trigger it if for example, CT player is alive and T play is alive when time ends it triggers for them
-
i tried to learn something, will this work? cttime1 = setTimer( function() local playerTeamCT1 = getTeamName(getPlayerTeam(getRootElement()) if getElementDimension ( getRootElement() ) == 0 then if ( playerTeamCT1 ) == "Counter Terrorist" then if getElementData ( getRootElement() , "alive" ) == true then triggerClientEvent ("TimeEndRestartCT1",getRootElement()) end end end end end, 129000, 0)
-
i do not want to trigger it 10 times i just want to trigger it ONE TIME for every CT team players alive WHEN TIME ENDS but i do not know how
-
EDITTTTTTTTTTTTTTT now will this do it? cttime1 = setTimer( function() local players = getPlayersInTeam ( CT ) for playerKey, playerValue in ipairs ( players ) do if getElementDimension ( playerValue ) == 0 then if getElementData ( playerValue , "alive" ) == true then triggerClientEvent ("TimeEndRestartCT1",playerValue) end end end end, 129000, 0) it won't trigger 10 times if players in ct are 10 alive, right?
-
i don't want that i just want to trigger the event for all alive ct players, which means if there are 5 alive ct players then it get trigged only for them, i don't want to trigger it 10 times will this do? cttime1 = setTimer( function() local getCTscore1 = getElementData(scoreCT1,"roundswonbyct1") local getTscore1 = getElementData(scoreT1,"roundswonbyt1") local playerTeamCT1 = getTeamName(getPlayerTeam(resourceRoot)) if getElementDimension ( resourceRoots ) == 0 then if ( playerTeamCT1 ) == "Counter Terrorist" then if getElementData ( resourceRoot , "alive" ) == true then setElementData(scoreCT1,"roundswonbyct1",getElementData(scoreCT1,"roundswonbyct1")+1) triggerClientEvent ("getitServer1",resourceRoot, getCTscore1,getTscore1) triggerClientEvent ("TimeEndRestartCT1",resourceRoot) end end end end, 129000, 0)
-
i don't want that... i want to trigger it for all alive CT players how do i fix that? i don't want it to trigger 30 times wtf D:
-
i have a question. for example if i have 30 players in my server will in this code it will set "roundswonbyct1" 30 times and will it trigger 30 times???? here is the code(serverSide): cttime1 = setTimer( function() local getCTscore1 = getElementData(scoreCT1,"roundswonbyct1") local getTscore1 = getElementData(scoreT1,"roundswonbyt1") local players = getElementsByType ( "player" ) for theKey,thePlayers in ipairs ( players ) do local playerTeamCT1 = getTeamName(getPlayerTeam(thePlayers)) if getElementDimension ( thePlayers ) == 0 then if ( playerTeamCT1 ) == "Counter Terrorist" then if getElementData ( thePlayers , "alive" ) == true then setElementData(scoreCT1,"roundswonbyct1",getElementData(scoreCT1,"roundswonbyct1")+1) triggerClientEvent ( thePlayers, "getitServer1",thePlayers, getCTscore1,getTscore1) triggerClientEvent (thePlayers, "TimeEndRestartCT1",thePlayers) end end end end end, 129000, 0) if yes.. then i don`t want that i just want to check if players in terrorist team are alive!!! please tell me how to fix that IF YES and also please explain if not, then tell me its okay ty
-
nvm! i found the problem! endtimeRound1 = setTimer ( function() setElementData(scoreCT1, "roundswonbyct1",getElementData(scoreCT1,"roundswonbyct1")+1) local getCTscore1 = getElementData(scoreCT1,"roundswonbyct1") -- this should have been here local getTscore1 = getElementData(scoreT1,"roundswonbyt1") -- this should have been here triggerClientEvent("getitServer1", resourceRoot, getCTscore1,getTscore1) end, 129000, 0) thanks just a fast question.. resourceRoot what will it do? is it for only the player?
-
it does not trigger
-
hold on please i will test not working
-
there is no function its just setTimer i just want to trigger it for the player in time
-
function omg1(getCTscore1,getTscore1) local player = getLocalPlayer() setElementData(player,"ClientCTWins1",getCTscore1) setElementData(player,"ClientTWins1",getTscore1) end addEvent("getitServer1",true) addEventHandler("getitServer1",root,omg1) client and scoreCT1 is just an object so it doesn't matter
-
the player that is getting triggered? is that wrong?
-
line 5
-
idk what is the problem i am trying to trigger for player after 2 mins but it doesn't work (setelment works) error: expected string at argument 1,got nil code(serverside): endtimeRound1 = setTimer ( function() local getCTscore1 = getElementData(scoreCT1,"roundswonbyct1") local getTscore1 = getElementData(scoreT1,"roundswonbyt1") setElementData(scoreCT1,"roundswonbyct1",getElementData(scoreCT1,"roundswonbyct1")+1) triggerClientEvent (source, "getitServer1",source, getCTscore1,getTscore1) end, 129000, 0)
-
thank you ecoo but i have a question. for example if i have 30 players in my server will in this code it will set "roundswonbyct1" 30 times and will it trigger 30 times???? here is the code(serverSide): cttime1 = setTimer( function() local getCTscore1 = getElementData(scoreCT1,"roundswonbyct1") local getTscore1 = getElementData(scoreT1,"roundswonbyt1") local players = getElementsByType ( "player" ) for theKey,thePlayers in ipairs ( players ) do local playerTeamCT1 = getTeamName(getPlayerTeam(thePlayers)) if getElementDimension ( thePlayers ) == 0 then if ( playerTeamCT1 ) == "Counter Terrorist" then if getElementData ( thePlayers , "alive" ) == true then setElementData(scoreCT1,"roundswonbyct1",getElementData(scoreCT1,"roundswonbyct1")+1) triggerClientEvent ( thePlayers, "getitServer1",thePlayers, getCTscore1,getTscore1) triggerClientEvent (thePlayers, "TimeEndRestartCT1",thePlayers) end end end end end, 129000, 0) if yes.. then i don`t want that i just want to check if players in terrorist team are alive!!! please tell me how to fix that IF YES and also please explain if not, then tell me its okay ty
-
how? please tell me
-
can people see that model? i mean can there be 2 hydra models?
-
hello.. i want the time to be the same for every body will this work? (i haven't tested because no players ) it is client btw i putted it client because the function (ifalldeadtime1) only works on client function setTimerForALL() local players = getElementsByType ( "player" ) for theKey,thePlayers in ipairs ( players ) do cttime1 = setTimer (ifalldeadTime1,12900,0) end end
-
tried it didn't work.. full code addEventHandler("onPlayerJoin",root, function() setPedStat ( source, 70, 999 ) setPedStat ( source, 71, 999 ) setPedStat ( source, 72, 999 ) setPedStat ( source, 74, 999 ) setPedStat ( source, 76, 999 ) setPedStat ( source, 77, 999 ) setPedStat ( source, 78, 999 ) setPedStat ( source, 79, 999 ) end ) function shootingWhileMoving() setWeaponProperty(23, "poor", "flag_move_and_aim", true ) setWeaponProperty( 24, "poor", "flag_move_and_aim",true) setWeaponProperty( 25, "poor", "flag_move_and_aim",true ) setWeaponProperty( 26, "poor", "flag_move_and_aim",true) setWeaponProperty( 27, "poor", "flag_move_and_aim", true ) setWeaponProperty( 29, "poor", "flag_move_and_aim", true ) setWeaponProperty( 30, "poor", "flag_move_and_aim", true ) setWeaponProperty( 31, "poor", "flag_move_and_aim",true ) setWeaponProperty( 33, "poor", "flag_move_and_aim", true) setWeaponProperty( 34, "poor", "flag_move_and_aim", true ) setWeaponProperty(23, "poor", "flag_move_and_shoot", true ) setWeaponProperty( 24, "poor", "flag_move_and_shoot",true) setWeaponProperty( 25, "poor", "flag_move_and_shoot",true ) setWeaponProperty( 26, "poor", "flag_move_and_shoot",true) setWeaponProperty( 27, "poor", "flag_move_and_shoot", true ) setWeaponProperty( 29, "poor", "flag_move_and_shoot", true ) setWeaponProperty( 30, "poor", "flag_move_and_shoot", true ) setWeaponProperty( 31, "poor", "flag_move_and_shoot",true ) setWeaponProperty( 33, "poor", "flag_move_and_shoot", true) setWeaponProperty( 34, "poor", "flag_move_and_shoot", true ) --- setWeaponProperty(23, "std", "flag_move_and_aim", true ) setWeaponProperty( 24, "std", "flag_move_and_aim",true) setWeaponProperty( 25, "std", "flag_move_and_aim",true ) setWeaponProperty( 26, "std", "flag_move_and_aim",true) setWeaponProperty( 27, "std", "flag_move_and_aim", true ) setWeaponProperty( 29, "std", "flag_move_and_aim", true ) setWeaponProperty( 30, "std", "flag_move_and_aim", true ) setWeaponProperty( 31, "std", "flag_move_and_aim",true ) setWeaponProperty( 33, "std", "flag_move_and_aim", true) setWeaponProperty( 34, "std", "flag_move_and_aim", true ) setWeaponProperty(23, "std", "flag_move_and_shoot", true ) setWeaponProperty( 24, "std", "flag_move_and_shoot",true) setWeaponProperty( 25, "std", "flag_move_and_shoot",true ) setWeaponProperty( 26, "std", "flag_move_and_shoot",true) setWeaponProperty( 27, "std", "flag_move_and_shoot", true ) setWeaponProperty( 29, "std", "flag_move_and_shoot", true ) setWeaponProperty( 30, "std", "flag_move_and_shoot", true ) setWeaponProperty( 31, "std", "flag_move_and_shoot",true ) setWeaponProperty( 33, "std", "flag_move_and_shoot", true) setWeaponProperty( 34, "std", "flag_move_and_shoot", true ) --- setWeaponProperty(23, "pro", "flag_move_and_aim", true ) setWeaponProperty( 24, "pro", "flag_move_and_aim",true) setWeaponProperty( 25, "pro", "flag_move_and_aim",true ) setWeaponProperty( 26, "pro", "flag_move_and_aim",true) setWeaponProperty( 27, "pro", "flag_move_and_aim", true ) setWeaponProperty( 29, "pro", "flag_move_and_aim", true ) setWeaponProperty( 30, "pro", "flag_move_and_aim", true ) setWeaponProperty( 31, "pro", "flag_move_and_aim",true ) setWeaponProperty( 33, "pro", "flag_move_and_aim", true) setWeaponProperty( 34, "pro", "flag_move_and_aim", true ) setWeaponProperty(23, "pro", "flag_move_and_shoot", true ) setWeaponProperty( 24, "pro", "flag_move_and_shoot",true) setWeaponProperty( 25, "pro", "flag_move_and_shoot",true ) setWeaponProperty( 26, "pro", "flag_move_and_shoot",true) setWeaponProperty( 27, "pro", "flag_move_and_shoot", true ) setWeaponProperty( 29, "pro", "flag_move_and_shoot", true ) setWeaponProperty( 30, "pro", "flag_move_and_shoot", true ) setWeaponProperty( 31, "pro", "flag_move_and_shoot",true ) setWeaponProperty( 33, "pro", "flag_move_and_shoot", true) setWeaponProperty( 34, "pro", "flag_move_and_shoot", true ) end
-
still not working! it works for 2 secs then i can't move used both codes