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

[ANY] Contracts


Post New Thread Reply   
 
Thread Tools Display Modes
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-22-2021 , 06:24   Re: [ANY] Contracts
Reply With Quote #321

Quote:
Originally Posted by echocage View Post
is your plugin working with [ANY] Store by Zephyrus [1.1 - 03.01.2016]? Idk why, my dont working
Yes. What is not working ?
__________________
Want to check my plugins ?
Arkarr is offline
echocage
Member
Join Date: Oct 2021
Old 10-22-2021 , 20:11   Re: [ANY] Contracts
Reply With Quote #322

Quote:
Originally Posted by Arkarr View Post
Yes. What is not working ?
idk which mistake
Video
echocage is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-25-2021 , 16:10   Re: [ANY] Contracts
Reply With Quote #323

Quote:
Originally Posted by echocage View Post
idk which mistake
Video
What's the value of 'sm_contract_store_select' ?
__________________
Want to check my plugins ?
Arkarr is offline
echocage
Member
Join Date: Oct 2021
Old 10-25-2021 , 18:11   Re: [ANY] Contracts
Reply With Quote #324

sm_contract_store_select "ZEPHYRUS" in server.cfg right?
echocage is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-26-2021 , 08:46   Re: [ANY] Contracts
Reply With Quote #325

Quote:
Originally Posted by echocage View Post
sm_contract_store_select "ZEPHYRUS" in server.cfg right?
Yes, but in adition, check that the value is correctly set to 'ZEPHYRUS' by writing 'sm_contract_store_select' in your server console.

EDIT:
Related part of code :
Code:
public void VerifyContract(int client)
{
	if (contractProgress[client] < contractObjective[client])
		return;
		
	if (!IsInContract[client])
		return;
	
	IsInContract[client] = false;
	
	contractAccomplishedCount[client]++;
	contractPoints[client] += contractReward[client];
	
	SaveIntoDatabase(client);
	
	char store[15];
	GetConVarString(CVAR_UsuedStore, store, sizeof(store));
	
	if (StrEqual(store, STORE_ZEPHYRUS))
	{
		Store_SetClientCredits(client, Store_GetClientCredits(client) + contractReward[client]);
	}
	else if (StrEqual(store, STORE_SMSTORE))
	{
		int id[1];
		id[0] = Store_GetClientAccountID(client);
		Store_GiveCreditsToUsers(id, 1, contractReward[client]);
	}
	else if (StrEqual(store, STORE_SMRPG))
	{
		SMRPG_SetClientExperience(client, SMRPG_GetClientExperience(client) + contractReward[client]);
	}
	else if (StrEqual(store, STORE_MYJS))
	{
		MyJailShop_SetCredits(client, MyJailShop_GetCredits(client)+contractReward[client]);
	}
	
	char message[100];
	
	Format(message, sizeof(message), "%s %t", PLUGIN_TAG, "Contract_ThankYou");
	PrintMessageChat(client, message);
	
	Format(message, sizeof(message), "%s %t", PLUGIN_TAG, "Contract_ThankReward", contractReward[client]);
	PrintMessageChat(client, message);
	
	SetClientCookie(client, COOKIE_CurrentContract, "-");
}
__________________
Want to check my plugins ?

Last edited by Arkarr; 10-26-2021 at 08:51.
Arkarr is offline
GnomeChompski
Senior Member
Join Date: Jul 2012
Old 08-12-2022 , 15:30   Re: [ANY] Contracts
Reply With Quote #326

Has anyone tried this in MvM? Wondering how handy this will be as an added extra to do
__________________
GnomeChompski is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 08-24-2022 , 16:01   Re: [ANY] Contracts
Reply With Quote #327

Quote:
Originally Posted by GnomeChompski View Post
Has anyone tried this in MvM? Wondering how handy this will be as an added extra to do
Should work too.
__________________
Want to check my plugins ?
Arkarr is offline
whiteskypony
Member
Join Date: Jun 2015
Location: vsh_crevice_b5
Old 08-27-2022 , 19:29   Re: [ANY] Contracts
Reply With Quote #328

What version of SM is needed to compile this? I tried from 1.6 to 1.11 and all give me errors
__________________
Steam | Vidya Servers | Discord: Maximo#5396 / kitsumy.


whiteskypony is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 09-06-2022 , 13:40   Re: [ANY] Contracts
Reply With Quote #329

Quote:
Originally Posted by whiteskypony View Post
What version of SM is needed to compile this? I tried from 1.6 to 1.11 and all give me errors
What kind of errors ?
__________________
Want to check my plugins ?
Arkarr is offline
whiteskypony
Member
Join Date: Jun 2015
Location: vsh_crevice_b5
Old 09-11-2022 , 14:40   Re: [ANY] Contracts
Reply With Quote #330

Quote:
Originally Posted by Arkarr View Post
What kind of errors ?
Here is what the compiler output:

Code:
SourcePawn Compiler 1.11.0.6906
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2021 AlliedModders LLC

D:\Backups (Random)\Source Mod  - Compiller\SM 1.11\include\smrpg\smrpg_upgrades.inc(267) : error 153: Array-based enum structs have been removed. See https://wiki.alliedmods.net/SourcePa...x#Enum_Structs
D:\Backups (Random)\Source Mod  - Compiller\SM 1.11\include\lastrequest.inc(69) : error 153: Array-based enum structs have been removed. See https://wiki.alliedmods.net/SourcePa...x#Enum_Structs

2 Errors.

[error code 1 (0x00000001)]
__________________
Steam | Vidya Servers | Discord: Maximo#5396 / kitsumy.


whiteskypony 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 06:00.


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