Raised This Month: $4 Target: $400
 1% 

[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 , 07: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 ?
__________________
Arkarr is offline
echocage
Junior Member
Join Date: Oct 2021
Old 10-22-2021 , 21: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 , 17: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' ?
__________________
Arkarr is offline
echocage
Junior Member
Join Date: Oct 2021
Old 10-25-2021 , 19: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 , 09: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, "-");
}
__________________

Last edited by Arkarr; 10-26-2021 at 09:51.
Arkarr 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 19:49.


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