MJBS
Would you like to react to this message? Create an account in a few clicks or log in to continue.

what's wrong with my script? :(

4 posters

Go down

what's wrong with my script? :( Empty what's wrong with my script? :(

Post  SuperSkye~ Tue Jul 31, 2012 3:32 pm

Hey people, my script doesn't work? Here have a look:

Code:
addhook("spawn" , "_spawn")
function _spawn(id)
    parse("equip "..id.." 30"
end

It's supposed to give you an AK-47 at spawn. What am i doing wrong? Sad



SuperSkye~
SuperSkye~
Hated

Posts : 40
Points : 59
Reputation : -10
Join date : 2012-07-31

Back to top Go down

what's wrong with my script? :( Empty Re: what's wrong with my script? :(

Post  MJBS | Penguind Tue Jul 31, 2012 3:36 pm

I don't know how to script or write lua. Sorry bro. Ask Surf in a PM.
MJBS | Penguind
MJBS | Penguind
Admin

Posts : 303
Points : 394
Reputation : 10
Join date : 2012-07-30
Age : 26
Location : Canada, Ontario, Bath

http://www.mjbs2d.forumtl.com

Back to top Go down

what's wrong with my script? :( Empty Re: what's wrong with my script? :(

Post  SurfingGamer87 Tue Jul 31, 2012 3:38 pm

You forgot to close the brackets
Code:
addhook("spawn" , "_spawn")
function _spawn(id)
    parse("equip "..id.." 30")
end

Easy fix, Smile
SurfingGamer87
SurfingGamer87
Admin

Posts : 254
Points : 357
Reputation : 9
Join date : 2012-07-30
Location : Philippines

https://mjbs2d.forumtl.com

Back to top Go down

what's wrong with my script? :( Empty Re: what's wrong with my script? :(

Post  SuperSkye~ Tue Jul 31, 2012 3:43 pm

Wow, thanks SurfingIdiot87 xD
SuperSkye~
SuperSkye~
Hated

Posts : 40
Points : 59
Reputation : -10
Join date : 2012-07-31

Back to top Go down

what's wrong with my script? :( Empty Re: what's wrong with my script? :(

Post  SurfingGamer87 Tue Jul 31, 2012 3:43 pm

lol no xD
SurfingGamer87
SurfingGamer87
Admin

Posts : 254
Points : 357
Reputation : 9
Join date : 2012-07-30
Location : Philippines

https://mjbs2d.forumtl.com

Back to top Go down

what's wrong with my script? :( Empty Re: what's wrong with my script? :(

Post  VADemon Tue Jul 31, 2012 3:54 pm

DO NOT USE EQUIP IN A SPAWN HOOK!
Use
Code:
function spawn(id)
return 1,2,3 --ID's of weapons
end
instead.
VADemon
VADemon

Posts : 101
Points : 125
Reputation : 9
Join date : 2012-07-31
Age : 22

Back to top Go down

what's wrong with my script? :( Empty Re: what's wrong with my script? :(

Post  SuperSkye~ Tue Jul 31, 2012 3:56 pm

VADemon wrote:DO NOT USE EQUIP IN A SPAWN HOOK!
Use
Code:
function spawn(id)
return 1,2,3 --ID's of weapons
end
instead.

Thanks!
SuperSkye~
SuperSkye~
Hated

Posts : 40
Points : 59
Reputation : -10
Join date : 2012-07-31

Back to top Go down

what's wrong with my script? :( Empty Re: what's wrong with my script? :(

Post  MJBS | Penguind Tue Jul 31, 2012 4:07 pm

Close this thread?
MJBS | Penguind
MJBS | Penguind
Admin

Posts : 303
Points : 394
Reputation : 10
Join date : 2012-07-30
Age : 26
Location : Canada, Ontario, Bath

http://www.mjbs2d.forumtl.com

Back to top Go down

what's wrong with my script? :( Empty Re: what's wrong with my script? :(

Post  SurfingGamer87 Tue Jul 31, 2012 4:10 pm

Ok boys time to lock this


LOCKED!
SurfingGamer87
SurfingGamer87
Admin

Posts : 254
Points : 357
Reputation : 9
Join date : 2012-07-30
Location : Philippines

https://mjbs2d.forumtl.com

Back to top Go down

what's wrong with my script? :( Empty Re: what's wrong with my script? :(

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum