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

[FSG] Flameshooting SG550 v1.4


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
ezio_auditore
Senior Member
Join Date: May 2013
Old 11-02-2014 , 02:02   [FSG] Flameshooting SG550 v1.4
Reply With Quote #1

Flameshooting SG550[FSG] v1.4
-ezio_auditore

.:: Description :..
This is the SG550 which costs $10000 and shoots a projectile which turns into flames upon collision with player/wallls and does radius damage when fired. To shoot, press attack1 & to zoom, press attack 2. This has clip ammo of 5 and BPAmmo of 45 (All adjustible).

.:: Special Thanks ::.
Spoiler


.:: CVars ::.
Spoiler


.:: Changelog ::.
Spoiler


.:: Client Commands ::.
Chat Commands
say /fsg -- Buys an FSG

Console Commands
fsg -- Buys an FSG
Attached Images
File Type: jpg de_dust2_spam_spots0000.jpg (60.7 KB, 598 views)
File Type: jpg de_dust2_spam_spots0004.jpg (31.5 KB, 584 views)
Attached Files
File Type: sma Get Plugin or Get Source (fsg.sma - 281 views - 14.1 KB)
File Type: zip fsg_files.zip (666.7 KB, 178 views)
__________________

Last edited by ezio_auditore; 11-04-2014 at 05:44. Reason: Changelog
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 11-02-2014 , 03:52   Re: [FSG] Flameshooting SG550
Reply With Quote #2

You should post some screenshots / video.
__________________
Kia is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-02-2014 , 04:38   Re: [FSG] Flameshooting SG550
Reply With Quote #3

The source can't be downloaded, maybe a forum bug ?
__________________
HamletEagle is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 11-02-2014 , 05:42   Re: [FSG] Flameshooting SG550
Reply With Quote #4

ok. I'll try and upload it again
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
bat
Veteran Member
Join Date: Jul 2012
Old 11-02-2014 , 06:21   Re: [FSG] Flameshooting SG550
Reply With Quote #5

PHP Code:
L 11/02/2014 14:09:19: [AMXXRun time error 10native error (native "dllfunc")
L 11/02/2014 14:09:19: [AMXX]    [0fakemeta_util.inc::fm_strip_user_gun (line 681)
L 11/02/2014 14:09:19: [AMXX]    [1fsg.sma::LogEvent_RoundEnd (line 389
Code:
public LogEvent_RoundEnd() {
	if (get_pcvar_num(g_RoundOnly) == 1)
	{
		for (new i = 1; i < g_maxplayers; i++) {
			fm_strip_user_gun(i, CSW_SG550)
			g_Hasfsg[i] = false
		}
	}
	
	// Find and remove all dropped crossbows
	new ent = find_ent_by_class(-1, "drop_crossbow")
	if (ent)
		remove_entity(ent)
}
------->

Code:
public LogEvent_RoundEnd() {
	if (get_pcvar_num(g_RoundOnly) == 1)
	{
	        new ent = find_ent_by_class(-1, "drop_crossbow")
		for (new i = 1; i < g_maxplayers; i++) 
                {
                    if(user_has_weapon(i, CSW_SG550))
                    {
			engclient_cmd(i, "drop", "drop_crossbow")
	                if (ent)
		             remove_entity(ent)
			g_Hasfsg[i] = false
                    }
		}
	}
}
__________________

Last edited by bat; 11-02-2014 at 06:22.
bat is offline
Send a message via Skype™ to bat
Old 11-02-2014, 06:57
ezio_auditore
This message has been deleted by ezio_auditore. Reason: No
ezio_auditore
Senior Member
Join Date: May 2013
Old 11-02-2014 , 07:18   Re: [FSG] Flameshooting SG550
Reply With Quote #6

Quote:
Originally Posted by Kia View Post
You should post some screenshots / video.
Upload screenshots (Sorry For Low Quality) Will upload the video in a while

Quote:
Originally Posted by HamletEagle View Post
The source can't be downloaded, maybe a forum bug ?
Try it now maybe

Thanks Bat. Fixed
__________________

Last edited by ezio_auditore; 11-02-2014 at 07:19.
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-02-2014 , 07:28   Re: [FSG] Flameshooting SG550 v1.1
Reply With Quote #7

In LogEvent_RoundEnd some problems:
1. Don't create new vars inside loop.
2. What's the point in removing the same ent 32 times ?
3. Use get_players for looping all players.

For removing all the dropped ents you should do like( outside the player loop )
Code:
new ent = -1 while((ent = find_ent_by_class(ent, "classname")) {     remove_entity(ent) }

The way in which you name your hooks make your code less readable, choose one style and stick to it and use proper names.

Here you are creating an useless var:
Code:
new ent = find_ent_by_owner(-1, "weapon_sg550", id) cs_set_weapon_ammo(ent, cs_get_weapon_ammo(get_pdata_cbase(id, 373)) - 1)

Do you know what you are doing ? Is this your code ? I'm asking because:
Code:
for (new i = 1 ; i < get_maxplayers() ; i++){
You already cached get_maxplayers into a variable.
__________________

Last edited by HamletEagle; 11-02-2014 at 07:34.
HamletEagle is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 11-02-2014 , 07:32   Re: [FSG] Flameshooting SG550 v1.1
Reply With Quote #8

Quote:
Originally Posted by HamletEagle View Post
In LogEvent_RoundEnd some problems:
1. Don't create new vars inside loop.
2. What's the point in removing the same ent 32 times ?
3. Use get_players for looping all players.

For removing all the dropped ents you should do like( outside the player loop )
Code:
new ent = -1 while((ent = find_ent_by_class(ent, "classname")) {     remove_entity(ent) }
Where?
Its not in this plugin...
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-02-2014 , 07:40   Re: [FSG] Flameshooting SG550 v1.1
Reply With Quote #9

Are you sure ?
Code:
// Restart public Event_GameRestart() {     g_restarted = true } //Bat public LogEvent_RoundEnd() {     if (get_pcvar_num(g_RoundOnly) == 1)     {         for (new i = 1; i < g_maxplayers; i++) {             g_Hasfsg[i] = false             engclient_cmd(i, "drop", "drop_fsg")             new ent = find_ent_by_class(-1, "drop_fsg")             if (ent)                 remove_entity(ent)         }     } }

Code:
public fw_ProjectileTouch(ent, id){     if (!pev_valid(ent)) return     new owner = pev(ent, pev_owner)         new szClassname[32]     pev(ent, pev_classname, szClassname, 31)         new Float:fOrigin[3]     pev(ent, pev_origin, fOrigin)         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)     write_byte(TE_EXPLOSION)     engfunc(EngFunc_WriteCoord, fOrigin[0])     engfunc(EngFunc_WriteCoord, fOrigin[1])     engfunc(EngFunc_WriteCoord, fOrigin[2])     write_short(explode2)     write_byte(10)     write_byte(15)     write_byte(0)     message_end()         if (equal(szClassname, "fsg_projectile")){         for (new i = 1 ; i < get_maxplayers() ; i++){             if (is_user_alive(i)){                 if (get_user_team(owner) != get_user_team(i) || get_pcvar_num(pFire) == 1){                     new Float:f_vOrigin[3]                     new Float:fDistance, fDist                     pev(i, pev_origin, f_vOrigin)                     fDistance = get_distance_f(fOrigin, f_vOrigin)                     fDist = floatround(fDistance)                              new Float:rad = get_pcvar_float(g_Radius)                                         if (fDist <= rad){                         damage(i, owner)                     }                 }             }         }     }        remove_entity(ent) }

Maybe you uploaded a wrong version.
__________________
HamletEagle is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 11-02-2014 , 07:44   Re: [FSG] Flameshooting SG550 v1.1
Reply With Quote #10

Its the right version.

In LogEvent_RoundEnd() , The removed ent is fsg_drop
In fw_ProjectileTouch() , The removed ent is fsg_projectile
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
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:46.


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