Raised This Month: $209 Target: $400
 52% 

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 , 10: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 , 12:22   Re: How to give an extra weapon for survivors?
Reply With Quote #2

Please post the full code. Maybe, I can help you.
__________________
Problem with ZP?
ZP Helper!
zmd94 is offline
maxidentitiy
Junior Member
Join Date: Jul 2014
Old 07-29-2014 , 11: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 , 13: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!
__________________
Just4Games is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-29-2014 , 14: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.
__________________
Problem with ZP?
ZP Helper!

Last edited by zmd94; 07-29-2014 at 14:18.
zmd94 is offline
maxidentitiy
Junior Member
Join Date: Jul 2014
Old 07-29-2014 , 23: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 - 506 views - 21.3 KB)
maxidentitiy is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-30-2014 , 06: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)
__________________
Problem with ZP?
ZP Helper!

Last edited by zmd94; 07-30-2014 at 12:29.
zmd94 is offline
maxidentitiy
Junior Member
Join Date: Jul 2014
Old 07-30-2014 , 12: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 , 12:28   Re: How to give an extra weapon for survivors?
Reply With Quote #9

Quote:
Terima kasih!
Sama-sama. Selamat datang ke AlliedModders!
__________________
Problem with ZP?
ZP Helper!

Last edited by zmd94; 07-30-2014 at 12:28.
zmd94 is offline
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 07-30-2014 , 15: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
__________________
Just4Games is offline
Reply


Thread Tools
Display Modes

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 13:00.


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