English Strip Usp/Glock at start

10 replies
Goto Page
To the start Previous 1 Next To the start
08.09.13 03:01:21 pm
Up
alex72super
User
Offline Off
hello i tried to make a script that removed the usp/glock
when the player started

Code:
1
2
3
4
5
6
addhook("spawn","_spawn")
function _spawn(id,type)
 if ("type<=51 and type>=49") then
 return x
     end
end


can you help me fix it?
08.09.13 03:16:57 pm
Up
Rainoth
Moderator
Offline Off
Code:
1
2
3
4
addhook("spawn","_spawn")
function _spawn(id)
     return "x" -- or parse("strip "..id) will do the same thing either way.
end
08.09.13 03:31:01 pm
Up
alex72super
User
Offline Off
Thanks a lot!

I never though it was that simple, i checked the FAQ thats where i got the "return x" Thank you.
08.09.13 03:46:11 pm
Up
brofistmsia
User
Offline Off
Cool!
08.09.13 03:57:58 pm
Up
EP
User
Offline Off
@user Rainoth: awesome! love you!
09.09.13 04:41:06 pm
Up
omg
User
Offline Off
............

why not just put noweapons entity in map
will code for food
09.09.13 05:03:13 pm
Up
alex72super
User
Offline Off
user omg has written:
............

why not just put noweapons entity in map


Its for a script im making.
09.09.13 08:02:30 pm
Up
H-X
User
Offline Off
I agree with user omg.
Maths is the most magical place where you buy 70 watermelons and no one cares about it.
09.09.13 08:39:38 pm
Up
Rainoth
Moderator
Offline Off
Quote:
why not just put noweapons entity in map


Because it's easier to write 4 lines than put an entity for every map you're playing
10.09.13 01:21:12 pm
Up
IRAN TOWN
User
Offline Off
user alex72super has written:
hello i tried to make a script that removed the usp/glock

You can use this lua script.

Code:
1
2
3
4
5
6
7
8
addhook('spawn','spawn_hook')
function spawn_hook(id)
if player(id,'team')==1 then
parse('strip '..id..' 2')
else
parse('strip '..id..' 1')
end
end
10.09.13 01:37:43 pm
Up
alex72super
User
Offline Off
user IRAN TOWN has written:
user alex72super has written:
hello i tried to make a script that removed the usp/glock

You can use this lua script.

Code:
1
2
3
4
5
6
7
8
addhook('spawn','spawn_hook')
function spawn_hook(id)
if player(id,'team')==1 then
parse('strip '..id..' 2')
else
parse('strip '..id..' 1')
end
end


Thank you iran but user Rainoth already gave me a code and its more simpler i guess thanks anyway.
To the start Previous 1 Next To the start