Forum

> > CS2D > Scripts > lua no works [ resolved ]'
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch lua no works [ resolved ]'

9 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: lua no works [ resolved ]'

Apache uwu
User Off Offline

Zitieren
Looks fine:

When an admin shoots a player with a m3 it will deal 100 health damage points. However if the player is not an admin or is not using the m3, it will use the cs2d hit system and deal normal damage. (Unless mp_damagefactor is changed).

You must have your usid in the table for this to work properly.

1
admins={70746}

alt Re: lua no works [ resolved ]'

Blunt
User Off Offline

Zitieren
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
admins={70746} <--- YOUR USGN HERE  i have make this for you! 

 function admincheck(usgn)
 for num, val in iparis(admins) do
 if val==usgn then
 return true
 else
 return false
 end
 end
 end

 weaponid = 10
 weapondamage = 100

 addhook("hit","customdamage")
 function customdamage(id,pl,weapon)
 if admincheck(player(pl,"usgn"))~=false then
 if weapon==weaponid then
 if (player(id,"health")-weapondamage)>0 then
 parse("sethealth "..id.." "..(player(id,"health")-weapondamage))
 else
 parse("customkill "..pl.." \""..itemtype(weapon,"name").."\" "..id)
 end
 return 1
 end
 end
 end

Test now!

alt Re: lua no works [ resolved ]'

Doctard
User Off Offline

Zitieren
i like how your saying "HOW" "help me PLEASE" and your not looking at the things we posted, either learn how to do lua or let a fellow mate do it for ya
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht