Forum




Wrench
12 replies



1
2
3
4
5
6
2
3
4
5
6
function __spawn(id) 	if ( player(id, "team") == 2 ) then 		parse("equip "..id.." 74") 	end end addhook("spawn", "__spawn")



Use the return value instead!

1
2
3
4
5
6
2
3
4
5
6
addhook("spawn","testdrive") function testdrive(id) 	if player(id,"team") >= 2 then 		return "74" 	end end

and it never gave me a wrench as a CT upon spawning. Did I mess up somewhere or is that a bug?
1
2
3
4
5
6
2
3
4
5
6
addhook("spawn","testdrive") function testdrive(id) 	if player(id,"team") >= 2 then 		return 74 	end end


1
2
3
4
5
6
7
2
3
4
5
6
7
addhook('spawn',	'AA_spawn') function AA_spawn(id) 	if player(id, 'team') == 2 then 		return '74'; 	end end

You would have to use a timer to strip stuff right after spawn.
1. Equips you with that weapon ID.
2. Removes it from the ground.
Possibilities. Possibilities everywhere.

If you wanted more than one weapon on spawn, you'd have to use equip, right?
Wrong - you can specify a number of values separated by commas to equip several items at once.



