English Reward for end

13 replies
Goto Page
To the start Previous 1 Next To the start
11.07.18 03:43:41 pm
Up
tos12345678
User
Offline Off
Hi, i need a help in this script

If counter-terrostist win then
each counter-terrorist player will receive: coins[id]=coins[id]+100

\\
I would ask for an example script, thanks.
11.07.18 04:30:54 pm
Up
Yates
Reviewer
Offline Off
You're almost there. Here's how you check what the end result of the round is: cs2d cmd endround
11.07.18 04:47:24 pm
Up
tos12345678
User
Offline Off
But, when i scripting with addhook endround then
Each players gains 100 coins
edited 1×, last 11.07.18 04:48:03 pm
11.07.18 04:47:45 pm
Up
KingShadow
User
Offline Off
Code:
1
2
3
4
5
6
7
8
addhook('endround','endround_hook')
function endround_hook(mode)
if mode==2 then
for _, id in ipairs(player(0, "team2")) do
coins[id]=coins[id]+100
end
end
end
edited 5×, last 11.07.18 06:49:19 pm
11.07.18 04:48:35 pm
Up
tos12345678
User
Offline Off
Okey
11.07.18 05:45:11 pm
Up
px20
GAME BANNED
Offline Off
Code:
1
2
3
4
5
6
7
8
function end_hook(mode)
 if mode==2 then
  for k,id in ipairs(player(0,"team2")) do
   coins[id]=coins[id]+100
  end
 end
end
addhook("endround","end_hook")
11.07.18 05:48:15 pm
Up
Masea
Super User
Offline Off
@user KingShadow: What is that? You do not know how to code, so try to not help at things which you don't know.
Create and design your GUI easy and fast: file cs2d GUI Framework (12) | Go deep of the darkness and try your intrepidity: file cs2d Outlast 2 Modification (25)
11.07.18 06:06:17 pm
Up
KingShadow
User
Offline Off
@user Masea: what is your problem with me ? i just writing too fast so i made that :v also i forgot to add id in ipairs

PS:Edited!
edited 1×, last 11.07.18 06:15:12 pm
11.07.18 06:13:18 pm
Up
Yates
Reviewer
Offline Off
@user KingShadow: His issue is that your code doesn't do what the person asked and that's very annoying. Please don't do that. If you don't fully understand the request, don't post. If you want to understand the request, ask.
11.07.18 06:16:08 pm
Up
KingShadow
User
Offline Off
user Yates has written:
@user KingShadow: His issue is that your code doesn't do what the person asked and that's very annoying. Please don't do that. If you don't fully understand the request, don't post. If you want to understand the request, ask.


dude i edited it i know and i understand what he wants but i was writing too fast
11.07.18 06:48:22 pm
Up
Yates
Reviewer
Offline Off
It's still wrong. He only wants CT's to receive cash.
11.07.18 06:52:26 pm
Up
KingShadow
User
Offline Off
and now?
11.07.18 06:55:26 pm
Up
tos12345678
User
Offline Off
This code doesn't working with my coins=initArray(32)
in shortcut i dont get coins after CT win.
11.07.18 08:23:33 pm
Up
Masea
Super User
Offline Off
user KingShadow has written:
i just writing too fast so i made that :v
Then write slowly instead if that could teach me something wrong. Nothing enforces you to post faster than the light, right?

user KingShadow has written:
also i forgot to add id in ipairs
Lol. How did you forget that though? It was main and the only thing user tos12345678 wants anyway.

Furthermore, your approach is actually true - I have many problemos with you indeed.
Create and design your GUI easy and fast: file cs2d GUI Framework (12) | Go deep of the darkness and try your intrepidity: file cs2d Outlast 2 Modification (25)
To the start Previous 1 Next To the start