Forum

> > CS2D > Scripts > set 1 ammo and 1 clip during function?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch set 1 ammo and 1 clip during function?

1 Antwort
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt set 1 ammo and 1 clip during function?

kRm
User Off Offline

Zitieren
hello my lua is like that;
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
function ferb.checkplayeralive()
playeralive={}
playeralive[1]=0
playeralive[2]=0
thelast={}
thelast[1]=0
thelast[2]=0
     for idd=1,32 do
         if player(idd,"exists") and player(idd,"health")>0 and player(idd,"team")==1 then
             playeralive[1]=playeralive[1]+1
             thelast[1]=idd
     end
          if player(idd,"exists") and player(idd,"health")>0 and player(idd,"team")==2 then
             playeralive[2]=playeralive[2]+1
             thelast[2]=idd
          end
  end
          if lastman==false and playeralive[1]==1 then
              msg("\169255040040"..player(thelast[1],"name").." you are the only one, Now you can kill CT!\169C") 
              lastman=true
           elseif lastman==false and playeralive[2]==1 then
              msg("\169040040255"..player(thelast[2],"name").." is the one and only\169C")
              lastman=true
        end
		
          if playeralive[1]==1 and playeralive[2]==1 then -- THERE IS THE DUEL SYSTEM 
		  parse('sethealth '..thelast[1]..' '..100)
		  parse('sethealth '..thelast[2]..' '..100)
		  parse('setarmor '..thelast[1]..' '..0)
		  parse('setarmor '..thelast[2]..' '..0) 
		  parse('equip '..thelast[1]..' '..3) 
		  parse('equip '..thelast[2]..' '..3)
		  parse('setweapon '..thelast[1]..' '..3) 
		  parse('setweapon '..thelast[2]..' '..3)
          msg("\169240240240"..player(thelast[1],"name").." vs. "..player(thelast[2],"name").."@C")
      end
end

I want to do 1/1 (1 ammo and 1 clip) during this duel system. like shoot and reload shoot and reload. I tried but only I did 1 ammo with setammo commnd, how can I do that?
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht