Raised This Month: $32 Target: $400
 8% 

API Scripting Help How to give an extra weapon for survivors?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
maxidentitiy
Junior Member
Join Date: Jul 2014
Old 07-27-2014 , 09:41   How to give an extra weapon for survivors?
Reply With Quote #1

I have one extra weapon that i really like to add to a survivor but I dont know how... The version that I used is ZPA.

Code:
public plugin_precache()
{
	engfunc(EngFunc_PrecacheModel, V_MODEL)
	engfunc(EngFunc_PrecacheModel, P_MODEL)
	engfunc(EngFunc_PrecacheModel, W_MODEL)
	
	new i
	for(i = 0; i < sizeof(WeaponSounds); i++)
		engfunc(EngFunc_PrecacheSound, WeaponSounds[i])
	for(i = 0; i < sizeof(WeaponResources); i++)
	{
		if(i == 1) engfunc(EngFunc_PrecacheGeneric, WeaponResources[i])
		else engfunc(EngFunc_PrecacheModel, WeaponResources[i])
	}
	
	register_forward(FM_PrecacheEvent, "fw_PrecacheEvent_Post", 1)	
	g_smokepuff_id = engfunc(EngFunc_PrecacheModel, "sprites/wall_puff1.spr")
	
	g_balrog11 = zp_register_extra_item("Balrog-XI", 25,ZP_TEAM_SURVIVOR)
}
thanks for helping!
maxidentitiy is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-28-2014 , 11:22   Re: How to give an extra weapon for survivors?
Reply With Quote #2

Please post the full code. Maybe, I can help you.
zmd94 is offline
maxidentitiy
Junior Member
Join Date: Jul 2014
Old 07-29-2014 , 10:48   Re: How to give an extra weapon for survivors?
Reply With Quote #3

Do I need to upload the .sma file or post the full code?
maxidentitiy is offline
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 07-29-2014 , 12:09   Re: How to give an extra weapon for survivors?
Reply With Quote #4

It doesn't matter, upload or post, it's the same thing, we can see the code!
__________________

Just an old fart revisiting the nostalgia.
---------
Oh yeah
|[[ZPA/ZPS]NoSound]|[[ZPA/ZPS]Hud Stats(Edited)]|

PS: I go by MoistWomble nowadays.
Just4Games is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-29-2014 , 13:18   Re: How to give an extra weapon for survivors?
Reply With Quote #5

Quote:
Originally Posted by Just4Games View Post
It doesn't matter, upload or post, it's the same thing.
Yes, it right.

Last edited by zmd94; 07-29-2014 at 13:18.
zmd94 is offline
maxidentitiy
Junior Member
Join Date: Jul 2014
Old 07-29-2014 , 22:15   Re: How to give an extra weapon for survivors?
Reply With Quote #6

There it is. Hope you can help.
Attached Files
File Type: sma Get Plugin or Get Source (zp_extra_balrog11.sma - 556 views - 21.3 KB)
maxidentitiy is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-30-2014 , 05:02   Re: How to give an extra weapon for survivors?
Reply With Quote #7

@ maxidentitiy, I have edited and tested it.

Just visit the below link:
Quote:
Balrog-XI (for Survivor)

Last edited by zmd94; 07-30-2014 at 11:29.
zmd94 is offline
maxidentitiy
Junior Member
Join Date: Jul 2014
Old 07-30-2014 , 11:21   Re: How to give an extra weapon for survivors?
Reply With Quote #8

Quote:
Originally Posted by zmd94 View Post
@ maxidentitiy, I have edited and tested it.

Just visit the below link:
Thanks! Just want to know that I am a malaysian too. Terima Kasih!
maxidentitiy is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-30-2014 , 11:28   Re: How to give an extra weapon for survivors?
Reply With Quote #9

Quote:
Terima kasih!
Sama-sama. Selamat datang ke AlliedModders!

Last edited by zmd94; 07-30-2014 at 11:28.
zmd94 is offline
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 07-30-2014 , 14:58   Re: How to give an extra weapon for survivors?
Reply With Quote #10

This is an english forum. PM each other if you wanna talk using other languages
__________________

Just an old fart revisiting the nostalgia.
---------
Oh yeah
|[[ZPA/ZPS]NoSound]|[[ZPA/ZPS]Hud Stats(Edited)]|

PS: I go by MoistWomble nowadays.
Just4Games 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 01:37.


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