Raised This Month: $40 Target: $400
 10% 

[ANY] Store by Zephyrus [1.1 - 03.01.2016]


Post New Thread Reply   
 
Thread Tools Display Modes
beastedout
Member
Join Date: Aug 2018
Old 08-16-2018 , 06:42   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #1491

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <store>
#include <zephstocks>

#define STORE_MAX_ITEMS 2048


enum Sound
{
    
String:szSound[PLATFORM_MAX_PATH],
}

new 
g_eSounds[STORE_MAX_ITEMS][Sound];
new 
g_iSounds 0;


public 
OnPluginStart()
{
    new 
String:m_szGameDir[32];
    
GetGameFolderName(m_szGameDirsizeof(m_szGameDir));
    
    
Store_RegisterHandler("death_sound""path"Sounds_OnMapStartSounds_ResetSounds_ConfigSounds_EquipSounds_Removetrue);

    
HookEvent("player_death"onPlayerDeathEventHookMode_Pre);
}

public 
Sounds_OnMapStart()
{
    
decl String:tmp[PLATFORM_MAX_PATH];
    for(new 
i=0;i<g_iSounds;++i)
    {
        
strcopy(STRING(tmp), g_eSounds[i][szSound]);
        
PrecacheSound(tmp[6], true);
        
Downloader_AddFileToDownloadsTable(g_eSounds[i][szSound]);
    }
}

public 
Sounds_Reset()
{
    
g_iSounds 0;
}

public 
Sounds_Config(&Handle:kvitemid)
{
    
Store_SetDataIndex(itemidg_iSounds);
    
    
KvGetString(kv"path"g_eSounds[g_iSounds][szSound], PLATFORM_MAX_PATH);
    
    if(
FileExists(g_eSounds[g_iSounds][szSound], true))
    {
        ++
g_iSounds;
        return 
true;
    }
    
    return 
false;
}

public 
Sounds_Equip(clientid)
{
    new 
m_iData Store_GetDataIndex(id);
    return 
1;
}

public 
Sounds_Remove(clientid)
{
    return 
0;
}
public 
Action onPlayerDeath(Handle event, const char[] namebool dontBroadcast) {
    
int client GetClientOfUserId(GetEventInt(event"userid"));
    
int attacker GetClientOfUserId(GetEventInt(event"attacker"));
    
    if (
client == attacker)
        return;
    
    
float pos[3];
    
GetClientAbsOrigin(clientpos);
    
    
LoopIngamePlayers(i)
    {
        
ClientCommand(i"play %s"g_eSounds[m_iData][szSound]);
    }

Can someone help me complete this? Trying to make kill sound All Copied from store/sounds.sp

Last edited by beastedout; 08-16-2018 at 06:45. Reason: some stuff
beastedout is offline
NanoC
Senior Member
Join Date: Jan 2016
Location: Argentina
Old 08-19-2018 , 13:25   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #1492

is there a way to disable custom abilities? cuz i tried with (for example)
sm plugins unload store/customgravity or doublejump
but it looks weird cause it crashed the server or you can still seeing the abilities in the store menu, so if u can tell me the way to make a cvar for each abilities, will be better, or maybe a cvar with the items.txt path so i can change the path whenever i want

Last edited by NanoC; 08-19-2018 at 16:20.
NanoC is online now
Send a message via Skype™ to NanoC
beastedout
Member
Join Date: Aug 2018
Old 08-21-2018 , 10:10   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #1493

Quote:
Originally Posted by NanoC View Post
is there a way to disable custom abilities? cuz i tried with (for example)
sm plugins unload store/customgravity or doublejump
but it looks weird cause it crashed the server or you can still seeing the abilities in the store menu, so if u can tell me the way to make a cvar for each abilities, will be better, or maybe a cvar with the items.txt path so i can change the path whenever i want
Just don't add it in items.txt and It will be disabled I guess.
beastedout is offline
NanoC
Senior Member
Join Date: Jan 2016
Location: Argentina
Old 08-21-2018 , 13:15   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #1494

Quote:
Originally Posted by beastedout View Post
Just don't add it in items.txt and It will be disabled I guess.
no, i'm talking about disabling abilities in some maps, like:

stay gravity enabled on Jailbreak maps
disable gravity in minigame maps

Do you understand? I just wanna know if it's possible to change the path of items.txt or make a cvars to disable X number of entities or items inside items.txt
NanoC is online now
Send a message via Skype™ to NanoC
beastedout
Member
Join Date: Aug 2018
Old 08-21-2018 , 13:34   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #1495

Quote:
Originally Posted by NanoC View Post
no, i'm talking about disabling abilities in some maps, like:

stay gravity enabled on Jailbreak maps
disable gravity in minigame maps

Do you understand? I just wanna know if it's possible to change the path of items.txt or make a cvars to disable X number of entities or items inside items.txt
Oh, now I get what you're saying. I don't think there is sadly for jetpack, you can. You have to edit source file for that..

Last edited by beastedout; 08-21-2018 at 13:35.
beastedout is offline
rokfestr
Member
Join Date: Apr 2011
Old 08-21-2018 , 16:21   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #1496

How correctly to add Glow in a config?
rokfestr is offline
NanoC
Senior Member
Join Date: Jan 2016
Location: Argentina
Old 08-21-2018 , 20:00   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #1497

Quote:
Originally Posted by beastedout View Post
Oh, now I get what you're saying. I don't think there is sadly for jetpack, you can. You have to edit source file for that..
yes, i saw that, but i want it for the rest of the items xd
NanoC is online now
Send a message via Skype™ to NanoC
beastedout
Member
Join Date: Aug 2018
Old 08-22-2018 , 05:31   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #1498

Quote:
Originally Posted by rokfestr View Post
How correctly to add Glow in a config?
https://pastebin.com/ihSBXLM7 by .sneak
beastedout is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 08-22-2018 , 12:16   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #1499

hi guys
i recently started to use this plugin and it's freaking awesome but i'm facing some small issues which made me crazy...

i'm trying to add player skins but after all it's not displaying in the menu to be purchased.
i've checked plugin's code to see if i'm missing something and i've checked the model exists on server and download-server and it was.
i don't know what's wrong and here's my section for models in items.txt:
Code:
"Player Models"
	{
		"Terrorists"
		{
			"Freddy Krueger"
			{
				"model" "models/player/custom_player/kuristaja/krueger/krueger.mdl"
				"arms"	"models/player/custom_player/kuristaja/krueger/krueger_arms.mdl"
				"team" "2"
				"price" "800"
				"type" "playerskin"
			}
			"Michael Myers"
			{
				"model" "models/player/custom_player/kuristaja/myers/myers.mdl"
				"arms"	"models/player/custom_player/kuristaja/myers/myers_arms.mdl"
				"team" "2"
				"price" "800"
				"type" "playerskin"
			}
		}
		"Counter-Terrorists"
		{
			"Leatherface"
			{
				"model" "models/player/custom_player/kuristaja/leatherface/leatherface.mdl"
				"arms"	"models/player/custom_player/kuristaja/leatherface/leatherface_arms.mdl"
				"team" "3"
				"price" "800"
				"type" "playerskin"
			}
			"Billy the puppet"
			{
				"model" "models/player/custom_player/kuristaja/billy/billy.mdl"
				"arms"	"models/player/custom_player/kuristaja/billy/billy_normal.mdl"
				"team" "3"
				"price" "800"
				"type" "playerskin"
			}
		}
	}
__________________
ambn is offline
NanoC
Senior Member
Join Date: Jan 2016
Location: Argentina
Old 08-22-2018 , 12:24   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #1500

Quote:
Originally Posted by ambn View Post
hi guys
i recently started to use this plugin and it's freaking awesome but i'm facing some small issues which made me crazy...

i'm trying to add player skins but after all it's not displaying in the menu to be purchased.
i've checked plugin's code to see if i'm missing something and i've checked the model exists on server and download-server and it was.
i don't know what's wrong and here's my section for models in items.txt:


Hello, i'm using this and it works correctly, check it:


PHP Code:
"Store"
{    
    
"Skins"
    
{
        
"Terrorist"
        
{
            
"Name for skin"
            
{
                
"model" "models/player/custom_player/test1/test1.mdl"
                "team" "2"
                "type" "playerskin"
                "Plans"
                
{
                    
"15 days"
                    
{
                        
"price" "15000"
                        "time"    "1296000"
                    
}
                }
            }
        }    
        
        
"Antiterrorist"
        
{
            
"Name for skin"
            
{
                
"model" "models/player/custom_player/test2/test2.mdl"
                "team" "3"
                "type" "playerskin"
                "Plans"
                
{
                    
"15 days"
                    
{
                        
"price" "18000"
                        "time"    "1296000"            
                    
}
                }
            }
        }
    }


Last edited by NanoC; 08-22-2018 at 12:30.
NanoC is online now
Send a message via Skype™ to NanoC
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 15:28.


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