AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Flashlight Wont Spawn (https://forums.alliedmods.net/showthread.php?t=133863)

Mirun.Frontier 07-29-2010 14:01

Flashlight Wont Spawn
 
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
}


Mxnn 07-29-2010 14:20

Re: Flashlight Wont Spawn
 
If you want to give a flashbang the correct code is
PHP Code:

give_weapon(id"weapon_flashbang"


GXLZPGX 07-29-2010 14:33

Re: Flashlight Wont Spawn
 
Quote:

Originally Posted by Mxnn (Post 1255255)
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.

ConnorMcLeod 07-29-2010 14:45

Re: Flashlight Wont Spawn
 
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.

Mirun.Frontier 07-29-2010 16:24

Re: Flashlight Wont Spawn
 
Quote:

Originally Posted by ConnorMcLeod (Post 1255277)
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?

Mxnn 07-29-2010 20:57

Re: Flashlight Wont Spawn
 
Quote:

Originally Posted by GXLZPGX (Post 1255263)
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

Drak 07-29-2010 22:52

Re: Flashlight Wont Spawn
 
"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)

Mirun.Frontier 07-29-2010 23:07

Re: Flashlight Wont Spawn
 
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.

GXLZPGX 07-29-2010 23:15

Re: Flashlight Wont Spawn
 
Quote:

Originally Posted by Mxnn (Post 1255645)
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 (Post 1255245)
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.

Mirun.Frontier 07-29-2010 23:32

Re: Flashlight Wont Spawn
 
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?


All times are GMT -4. The time now is 00:11.

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