Initial upload

Initial upload
This commit is contained in:
Jaysyn904
2023-09-25 20:24:01 -04:00
parent 4e16ca63ca
commit 5197ad9a4d
7741 changed files with 5391820 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
//::///////////////////////////////////////////////
//:: Scarface's Persistent Banking
//:: sfpb_deposit
//:://////////////////////////////////////////////
/*
Written By Scarface
*/
//////////////////////////////////////////////////
#include "sfpb_config"
void main()
{
// Vars
object oPC = GetPCSpeaker(), oBanker = OBJECT_SELF;
string sID = SF_GetPlayerID(oPC);
string sAmount = GetLocalString(oBanker, "GOLD");
int nAmount = StringToInt(sAmount);
int nTotal;
// Anti-Cheat Check For Duping Gold
if (GetGold(oPC) >= nAmount)
{
// Take the deposited amount from the player and store
// in the database
TakeGoldFromCreature(nAmount, oPC, TRUE);
int nBanked = GetCampaignInt(GetName(GetModule()), DATABASE_GOLD + sID);
nTotal = nAmount + nBanked;
SetCampaignInt(GetName(GetModule()), DATABASE_GOLD + sID, nTotal);
}
else // Set Anti-Cheat Variable
SetLocalInt(oBanker, "ANTI_CHEAT", TRUE);
// Set custom token
SetCustomToken(1000, IntToString(nTotal));
}