Thread: [ANY] Contracts
View Single Post
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