Forum

> > CS2D > Scripts > M4A1 Only for CT?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch M4A1 Only for CT?

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt M4A1 Only for CT?

Mami Tomoe
User Off Offline

Zitieren
First thing, don't say I didn't try;
Mehr >


I need a script that will only let Counter-Terrorist to pickup the M4A1.

Thanks in advance.

alt Re: M4A1 Only for CT?

Rainoth
Moderator Off Offline

Zitieren
Do you even bother to look at scripts?
If you did, you'd know that most functions have arguments and player table needs an ID to get information from a certain player.

alt Solution

Ace Howl
User Off Offline

Zitieren
@user Mami Tomoe hat geschrieben
1
2
3
4
5
6
7
8
9
10
addhook ("walkover","m4a1")

function walkover
if ("player","walkover") == m4a1
then
if ("player","team") == 1
then return 0
else
return 1
end
Thanks in advance.


I can see that you are trying to make a code.

1
2
3
4
5
6
7
8
9
addhook("walkover","wo")

function wo(id,iid,type)
	if type==32 and player(id,"team")==1 then
		return 1
	else
		return 0
	end
end

alt Re: M4A1 Only for CT?

Mami Tomoe
User Off Offline

Zitieren
@user Ace Howl: Thanks it worked!
I needed to remove the "addhook" and replace the "wo" with "rp_walkover" because I already have a script that uses this function.

@user Rainoth: I did and that what I came up with, like I said a lot I'm new to lua (not THAT new) so I edit scripts to learn how they work and if you take a look at @user Ace Howl: script you can notice I only had few mistakes...
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht