English 10/10 Killer teleport other place next round.

11 replies
Goto Page
To the start Previous 1 Next To the start
Up
Man Of Steel
User
Offline Off
Hi everyone.

I want to add a new feature in my map, So i need community help for done it.

I want if Counter Terrorist Kill Players 10/10 Without die in round, Next Round his game start Tile 38|79, Actually i made a room for 10/10 Killer for Gift/achievement, There i made a Use button for gate
I set trigger_use name to "button". I Just want 10/10 Killer Only can open trigger_use "button"

I need this script
Pleas help me
FRiendly boYy.
21.06.18 03:05:15 pm
Up
Quattro
User
Offline Off
I would do this:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
ace = {}
tilex = 38
tiley = 79
for i = 1, 32 do ace[i] = 0 end

addhook("endround","kills_check")
addhook("startround","ace_check")

function kills_check()
     for i = 1, 32 do
        if player(i,'exists') then
            if player(i,'kills') == 10 then
                if player(i,'deaths') == 0 then
                    ace[i] = 1
                end
            end
        end
     end
end

function ace_check()
local x = tilex * 32
local y = tiley * 32
    for i = 1, 32 do
        if ace[i] == 1 then
            parse('setpos '..i..' '..x..' '..y)
        end
    end
end
21.06.18 03:23:51 pm
Up
Yates
Reviewer
Offline Off
@user Quattro: Couldn't you just move the whole kill check into the cs2d lua hook startround? Would be a waste of another hook and setting a variable for each player otherwise.

Oh you probably account for stat reset with cs2d lua hook endround, nevermind.
21.06.18 08:56:09 pm
Up
Man Of Steel
User
Offline Off
@user Yates: Can you give me Workable Code?
@user Quattro: Thanks a lot for help and and waste your time for me.

And can i ask @user Quattro: Script will work because i didn't check yet, i guess Quttro script don' work am i right @user Yates: if yes, so Please help me
FRiendly boYy.
21.06.18 10:04:13 pm
Up
Yates
Reviewer
Offline Off
It depends on the game mode and what happens when cs2d lua hook endround is triggered. Try out his script and see if it does what you want.
22.06.18 05:47:26 pm
Up
Man Of Steel
User
Offline Off
@user Yates: I checked the @user Quattro: script that isn't working even no errors.
FRiendly boYy.
22.06.18 06:02:52 pm
Up
Yates
Reviewer
Offline Off
Did you meet the conditions? Exactly 10 kills and no deaths?
22.06.18 06:44:02 pm
Up
Masea
Super User
Offline Off
user Quattro has written:
Code:
1
2
local x = tilex * 32
local y = tiley * 32
And by the way, this won't be the exact position you want. However, adding
+ 16
to the ending will be:
Code:
local x, y = tilex * 32 + 16, tiley * 32 + 16


Otherwise, we would be teleported moderately to top-left of the position which could bore us indeed.
Create your UI easy and fast: UI Framework | Go deeper into the darkness and test your bravery: file cs2d Outlast 2 Modification (27)
22.06.18 07:29:04 pm
Up
Quattro
User
Offline Off
Yeah Masea true, to place player in the center you gotta add 16/16.

LOL it really doesn't work because I forgot to write "score" and wrote "kills" instead. This gets me every time

Here you go tested myself:

Spoiler >
edited 5×, last 22.06.18 07:47:32 pm
23.06.18 08:50:57 am
Up
Man Of Steel
User
Offline Off
@user Quattro: Thanks buddy script working but please can you add another thing as i want?
Please make this script only for counter terrorist and I'm using trigger_use for On/Off Gate(Dynwall) as a gate for room i want Only 10/10 killer use this trigger_use.I set trigger_use name to (button) by the way.

can you help me again?

Anyways thanks a lot
FRiendly boYy.
23.06.18 11:32:54 am
Up
Quattro
User
Offline Off
Spoiler >


Making it for CT is easy, but combining things with trigger_use you have to figure out yourself or maybe someone else knows how to do it
23.06.18 01:54:27 pm
Up
Man Of Steel
User
Offline Off
Okay Thank you so much
FRiendly boYy.
To the start Previous 1 Next To the start