Raised This Month: $51 Target: $400
 12% 

Flashlight Wont Spawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mirun.Frontier
Member
Join Date: Aug 2008
Old 07-29-2010 , 14:01   Flashlight Wont Spawn
Reply With Quote #1

Note: This is for Resident Evil Cold Blood Beta 2. This does not concern any other mod!

I made a quick plugin on amxx for this mod, and it was to spawn a flashlight on given command.
The plugin compiled and then i tried testing it in-game, but it didn't work. (Now see I'm not very good with pawn)

All I did in the script was:
Code:
public give_flashlight(id)
{
    give_item(id, "weapon_flashlight")
    return PLUGIN_HANDLED
}
__________________
I can't believe I wasted 5 years of my life not knowing how to program correctly. Went too deep into advanced coding before even learning the basics correctly. :c

Last edited by Mirun.Frontier; 07-29-2010 at 14:15.
Mirun.Frontier is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 07-29-2010 , 14:20   Re: Flashlight Wont Spawn
Reply With Quote #2

If you want to give a flashbang the correct code is
PHP Code:
give_weapon(id"weapon_flashbang"
Mxnn is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 07-29-2010 , 14:33   Re: Flashlight Wont Spawn
Reply With Quote #3

Quote:
Originally Posted by Mxnn View Post
If you want to give a flashbang the correct code is
PHP Code:
give_weapon(id"weapon_flashbang"
Are you retarded? Do you not speak english? He said flashLIGHT not flashBANG. Jesus christ.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-29-2010 , 14:45   Re: Flashlight Wont Spawn
Reply With Quote #4

Where is this mod ?
Maybe flashlight is not avaible in that mod ?
Make sure cvar mp_flashlight exists and is set to 1.

Also, weapon_flashlight doesn't exist, flashlight is not an entity.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Mirun.Frontier
Member
Join Date: Aug 2008
Old 07-29-2010 , 16:24   Re: Flashlight Wont Spawn
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
Where is this mod ?
Maybe flashlight is not avaible in that mod ?
Make sure cvar mp_flashlight exists and is set to 1.

Also, weapon_flashlight doesn't exist, flashlight is not an entity.
A Flashlight exists in the mod.
Its a weapon.
Can be seen in this video of the game:
http://www.youtube.com/watch?v=wcnUXMlgs9E

Would this mod need a module?
__________________
I can't believe I wasted 5 years of my life not knowing how to program correctly. Went too deep into advanced coding before even learning the basics correctly. :c
Mirun.Frontier is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 07-29-2010 , 20:57   Re: Flashlight Wont Spawn
Reply With Quote #6

Quote:
Originally Posted by GXLZPGX View Post
Are you retarded? Do you not speak english? He said flashLIGHT not flashBANG. Jesus christ.
You can write the name of the mod. I think that you was speaking about CS and in CS "flashlight" isn't a weapon
Mxnn is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 07-29-2010 , 22:52   Re: Flashlight Wont Spawn
Reply With Quote #7

"weapon_flashlight" is the correct entity name for this mod.
Use "create_ent("weapon_flashlight")" and force a touch between it, and the player. (Although I think give_item() actually does this, not sure)
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Mirun.Frontier
Member
Join Date: Aug 2008
Old 07-29-2010 , 23:07   Re: Flashlight Wont Spawn
Reply With Quote #8

Mxnn, you clearly didn't read the BOLD type in the first post but that doesn't matter.
I'll try that next Drak.
give_item didn't spawn it at all, in RECB, you have to use E to pick everything up.
I think the amx_weapon plugin (or the command in amx_super) worked for this mod too, it just depended on the # of the weapon to spawn it. I don't know, its been a long time since I played this mod (a year or two perhaps), and getting this idea was probably from the first beta.
__________________
I can't believe I wasted 5 years of my life not knowing how to program correctly. Went too deep into advanced coding before even learning the basics correctly. :c

Last edited by Mirun.Frontier; 07-29-2010 at 23:11.
Mirun.Frontier is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 07-29-2010 , 23:15   Re: Flashlight Wont Spawn
Reply With Quote #9

Quote:
Originally Posted by Mxnn View Post
You can write the name of the mod. I think that you was speaking about CS and in CS "flashlight" isn't a weapon
Learn to read.

Quote:
Originally Posted by Mirun.Frontier View Post
Note: This is for Resident Evil Cold Blood Beta 2. This does not concern any other mod!
@Mirun.Frontier: Resident evil isn't one of the main supported games for pawn scripting so it will be hard to find many people that are willing to help you out.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Mirun.Frontier
Member
Join Date: Aug 2008
Old 07-29-2010 , 23:32   Re: Flashlight Wont Spawn
Reply With Quote #10

Yes I've noticed.
Most games that have a completely customized hud (Like Master Sword Continued and Resident Evil ) aren't supported unless you use Metamod-P(Which also fixed a Sven Coop 4.0B error where no 4.0 monster would spawn unless you had metamod-p which supported those monsters)

Its going to be hard. And I just tried Drak's idea, it didn't work.

Or I can just have it use the "give" command, but I don't like it when people have access to it also.
There any way I can make it have the user use the give weapon_flashlight command without having sv_cheats 1?
__________________
I can't believe I wasted 5 years of my life not knowing how to program correctly. Went too deep into advanced coding before even learning the basics correctly. :c
Mirun.Frontier is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode