Forum

> > CS2D > Scripts > vip is dead the game is still going
Forums overviewCS2D overview Scripts overviewLog in to reply

English vip is dead the game is still going

4 replies
To the start Previous 1 Next To the start

old Re: vip is dead the game is still going

princeofpersia
User Off Offline

Quote
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
playernamee={}
vip={}
vp={}
hats={}
addhook("join","join_hook")
addhook("startround","startround_hook")
addhook("endround","endhook")

function join_hook(id)
vip[id]=false
hats[id]=0
vp=false
end


function startround_hook()
local randome=math.random(1,32)
x=22*32
y=5*32
if player(randome,"exists") then
if vp==false and vip[randome]==false then
playernamee[randome]=player(randome,"name")
parse('setname '..randome..' '..playernamee[randome]..'(VIP) "1"')
hats[id]=image(--Your Vip Image--)
parse("setpos "..randome.." "..x.." "..y)
vip[randome]=true
vp=true
end
else
startround_hook()
end
end



function endhook(id)
for i=1,32 do
if vip[i]==true then
parse('setname '..i..' '..playernamee[i]..' "1"')
vip[i]=false
freeimage(hats[id])
end
end
vp=false
end

Run this in standard mode (when u joined restart once fot startround hook) . and choose a hat image for your VIP . i think its best idea .
lua tested and working for me . good luck
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview