English set 1 ammo and 1 clip during function?

1 reply
Goto Page
To the start Previous 1 Next To the start
Up
kRm
User
Offline Off
hello my lua is like that;
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
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?
15.01.18 05:55:09 pm
Up
Bowlinghead
User
Offline Off
In my script cs2dfile cs2d One in the Chamber (Black Ops Remake) (v1.1) (14) I used a variable to save the bullets.
By default its the max ammo size and decrements with every shot.
When this variable is set to zero I stripped the weapon or equpied it otherwise.
Share time limited free games here
To the start Previous 1 Next To the start