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

Can Anyone Fix Special Rounds .sma/code with errors and bugs plz?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mmiicchhaaeell
Member
Join Date: Oct 2020
Old 11-23-2020 , 22:08   Can Anyone Fix Special Rounds .sma/code with errors and bugs plz?
Reply With Quote #1

I know it's a long shot, but I am trying this anyway. I found this for special rounds, but it has errors/bugs. It respawns many times after dying and keeps respawning endlessly and makes no sense. Can't explain, very messed up. Can anyone fix this? Also, I wanted to make the weapons list shorter like this:


{"Hand-gun", "Night Haw2.50c", "weapon_deagle", CSW_DEAGLE},
{"Hand-gun", "Elites", "weapon_elite", CSW_ELITE},
{"Shotgun", "12 gauge", "weapon_m3", CSW_M3},
{"Shotgun", "Auto-Shotgun", "weapon_xm1014", CSW_XM1014},
{"Sub-machine", "TMP", "weapon_tmp", CSW_TMP},
{"Sub-machine", "ES-C90", "weapon_p90", CSW_P90},
{"Sub-machine", "Ingram MAC-10", "weapon_mac10", CSW_MAC10}
{"Rifles", "Scout", "weapon_scout", CSW_SCOUT},
{"Rifles", "Magnum", "weapon_awp", CSW_AWP},
{"Heavy", "Machine-gun", "weapon_m249", CSW_M249},
{"Melee", "Knife", "weapon_knife", CSW_KNIFE},
{"Nade", "HE grenade", "weapon_hegrenade", CSW_HEGRENADE}


-----------------------------------------------------------------------------------------------------------------

.sma file attached

Thanks!
Attached Files
File Type: sma Get Plugin or Get Source (cs_war.sma - 115 views - 33.6 KB)

Last edited by Mmiicchhaaeell; 11-23-2020 at 23:54.
Mmiicchhaaeell is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-23-2020 , 23:19   Re: Can Anyone Fix Special Rounds .sma/code with errors and bugs plz?
Reply With Quote #2

When posting long sections of code, you need to put it in [php][/php] tags so that it maintains code-like formatting and makes it easier to read. When posting a whole plugin, simply attach the .sma file to your post.

Regarding modifying the list of weapons, you should be able to make that edit just fine with the snippet of code that you posted (simply replace the original array data with your new data).

Once you edit your post to attach the .sma file, I'll consider looking at the code.
__________________
fysiks is offline
Mmiicchhaaeell
Member
Join Date: Oct 2020
Old 11-23-2020 , 23:54   Re: Can Anyone Fix Special Rounds .sma/code with errors and bugs plz?
Reply With Quote #3

I attached the .sma
Mmiicchhaaeell is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-24-2020 , 00:38   Re: Can Anyone Fix Special Rounds .sma/code with errors and bugs plz?
Reply With Quote #4

I'm not entirely sure what exactly your issue is but it sounds like you're simply describing a feature of the plugin where you will automatically be respawned during a "war" round 3 seconds after dying. This feature is controlled by the cvar "ww_allow_respawn" and it defaults to 1. This means that you will automatically respawn when you die. If you would like to disable this feature, you can set the "ww_allow_respawn" to 0 in amxx.cfg.
__________________

Last edited by fysiks; 11-24-2020 at 00:40. Reason: clarification
fysiks is offline
Mmiicchhaaeell
Member
Join Date: Oct 2020
Old 11-24-2020 , 16:55   Re: Can Anyone Fix Special Rounds .sma/code with errors and bugs plz?
Reply With Quote #5

Thank you so much! <3
Mmiicchhaaeell is offline
Mmiicchhaaeell
Member
Join Date: Oct 2020
Old 11-24-2020 , 17:09   Re: Can Anyone Fix Special Rounds .sma/code with errors and bugs plz?
Reply With Quote #6

when I just try to make it short this is the message it gave me when compiling: //// cs_war.sma

// C:\Users\mik\Desktop\compiler\compiler\cs_war .sma(79) : error 001: expected token: "}", but found "{"
// C:\Users\mik\Desktop\compiler\compiler\cs_war .sma(662) : warning 217: loose indentation
Mmiicchhaaeell is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-25-2020 , 00:32   Re: Can Anyone Fix Special Rounds .sma/code with errors and bugs plz?
Reply With Quote #7

Sounds like when you replaced the contents of the WeaponsData array, you either left an extra brace or removed one too many braces. Make sure that the braces are symmetric (i.e. that there is 1 open brace for every close brace).

PHP Code:
new const WeaponsData[][WEAPONSWAR] =
{
    {
"Hand-gun""Night Haw2.50c""weapon_deagle"CSW_DEAGLE},
    {
"Hand-gun""Elites""weapon_elite"CSW_ELITE},
    {
"Shotgun""12 gauge""weapon_m3"CSW_M3},
    {
"Shotgun""Auto-Shotgun""weapon_xm1014"CSW_XM1014},
    {
"Sub-machine""TMP""weapon_tmp"CSW_TMP},
    {
"Sub-machine""ES-C90""weapon_p90"CSW_P90},
    {
"Sub-machine""Ingram MAC-10""weapon_mac10"CSW_MAC10}
    {
"Rifles""Scout""weapon_scout"CSW_SCOUT},
    {
"Rifles""Magnum""weapon_awp"CSW_AWP},
    {
"Heavy""Machine-gun""weapon_m249"CSW_M249},
    {
"Melee""Knife""weapon_knife"CSW_KNIFE},
    {
"Nade""HE grenade""weapon_hegrenade"CSW_HEGRENADE}

__________________
fysiks is offline
Mmiicchhaaeell
Member
Join Date: Oct 2020
Old 11-25-2020 , 17:09   Re: Can Anyone Fix Special Rounds .sma/code with errors and bugs plz?
Reply With Quote #8

still not working and it is very strange
Mmiicchhaaeell is offline
Mmiicchhaaeell
Member
Join Date: Oct 2020
Old 11-25-2020 , 18:36   Re: Can Anyone Fix Special Rounds .sma/code with errors and bugs plz?
Reply With Quote #9

Just re did it and it worked. Very strange. Did not change anything. Anyways thank you so much for your time <3
Mmiicchhaaeell is offline
Mmiicchhaaeell
Member
Join Date: Oct 2020
Old 12-07-2020 , 00:41   Re: Can Anyone Fix Special Rounds .sma/code with errors and bugs plz?
Reply With Quote #10

One more question about this plugin: any way I can stop players from buying other weapons while the special round is on? Some players were getting other weapons. Then I tried and I was able to buy other weapons if it was in the beginning of the round.
Mmiicchhaaeell 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 14:37.


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