i dont know why its doesnt work
[lua]
for k, v in pairs(pw) do
pl:Give( pw[k] )
end
[/lua]
pw its table of weapons
i dont got the weapon /=
and got this error
NULL Ent in GiveNamedItem!
and the name is alright
please help?
Unless you've got an abnormal table, try this:
[lua]
for k, v in pairs(pw) do
pl:Give( v )
end
[/lua]
If you show an example of your "pw" table, I'd be able to help further.
pw is table with weapons name and i try to give to player this weapons
its gave this error
Attemp to create unknown entity type "weapon_real_cs_desert_eagel"!
NULL Ent in GiveNamedItem!
Attemp to create unknown entity type "weapon_real_cs_ak47"!
NULL Ent in GiveNamedItem!
and i have this weapons in the addons dir..
It's spelt "eagle" not "eagel", maybe that's why?
Can you spawn those weapons from the Q menu?
[QUOTE=Drakehawke;31688081]It's spelt "eagle" not "eagel", maybe that's why?
Can you spawn those weapons from the Q menu?[/QUOTE]
yes
and if i do it like that
[lua]pl:Give( "weapon_real_cs_desert_eagle" )[/lua]
its work.. but in the loop is not.
by the way can i add you to steam ? to talk in chat
Yeah sure, and post the rest of the script.
ok i will add you now
[editline]12th August 2011[/editline]
your friend list is full you have 249 friends :D
[lua]
local pw = string.Explode(", ",'"weapon_real_cs_desert_eagle", "weapon_real_cs_ak47"')
for k, v in pairs(pw) do
pl:Give( v )
end
[/lua]
Try
[lua]
local pw = { "weapon_real_cs_desert_eagle", "weapon_real_cs_ak47" }
for k, v in pairs( pw ) do
pl:Give( v )
end[/lua]
And sorry, I deleted a few people, try now.
[QUOTE=Drakehawke;31689018]Try
[lua]
local pw = { "weapon_real_cs_desert_eagle", "weapon_real_cs_ak47" }
for k, v in pairs( pw ) do
pl:Give( v )
end[/lua]
And sorry, I deleted a few people, try now.[/QUOTE]
still
Attemp to create unknown entity type "weapon_real_cs_desert_eagle", "weapon_real_cs_ak47"!
NULL Ent in GiveNamedItem!
and accept me on steam its me BareL
What if you change the top line to:
[lua]local pw = { "weapon_rpg", "weapon_crowbar" }[/lua]
[QUOTE=Drakehawke;31690215]What if you change the top line to:
[lua]local pw = { "weapon_rpg", "weapon_crowbar" }[/lua][/QUOTE]
still nothing
Same error?
I managed to fix the problem Thank you anyway
Just out of curiosity, what was it?
it was my fail
pl:StripWeapons()
after this
You were trying to strip all the weapons?
He was giving them the weapons, then stripping their weapons, then wondering why they didn't have the weapons :P
Sorry, you need to Log In to post a reply to this thread.