Forum

> > CS2D > Scripts > No Melee
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch No Melee

24 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Re: No Melee

Dynamite07
User Off Offline

Zitieren
user wotaan hat geschrieben
anyway different solution-->

Nice but can you explain why the other code didnt work? i think idd is not working.

alt Re: No Melee

Avo
User Off Offline

Zitieren
Zitat
he is really good lua coder

Yeap, he even uses tabs. Using 'always' hook is also very professional here. Same at his 'for' loop.

alt Re: No Melee

wotaan
User Off Offline

Zitieren
@user Dynamite07: i test it before you asked, and answer is it is working, but maybe return a string value because of that our codes didnt work.. with tonumber() it will be good.

alt Re: No Melee

Dynamite07
User Off Offline

Zitieren
user wotaan hat geschrieben
@user Dynamite07: i test it before you asked, and answer is it is working, but maybe return a string value because of that our codes didnt work.. with tonumber() it will be good.

Doesnt make sense idk what can we do with idd.

What i think:
addhook("drop","drop") --"When a player tries to drop an item."
function drop(id,idd)
if idd == 1 then -- if the item id = 1 then
parse("equip "..id.." 45") -- equip a laser
end

This break my mind.

alt Re: No Melee

wotaan
User Off Offline

Zitieren
just use tonumber ..

1
2
3
4
5
6
addhook("drop","_drop")
function _drop(id,iid,type,ain,a,mode,x,y)
if tonumber(type)==74 then
return 1
end
end
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht