beautified the plugin #1
1 changed files with 27 additions and 36 deletions
|
@ -62,38 +62,31 @@ public void OnConfigsExecuted() {
|
||||||
g_iPBAmount = GetConVarInt(g_hPBAmount);
|
g_iPBAmount = GetConVarInt(g_hPBAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnMapStart()
|
public void OnMapStart() {
|
||||||
{
|
|
||||||
GetCurrentMap(gS_Map, 160);
|
GetCurrentMap(gS_Map, 160);
|
||||||
GetMapDisplayName(gS_Map, gS_Map, 160);
|
GetMapDisplayName(gS_Map, gS_Map, 160);
|
||||||
iTier = Shavit_GetMapTier(gS_Map);
|
iTier = Shavit_GetMapTier(gS_Map);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Action Shavit_OnStart(int client, int track)
|
public Action Shavit_OnStart(int client, int track) {
|
||||||
{
|
|
||||||
istyle = Shavit_GetBhopStyle(client);
|
istyle = Shavit_GetBhopStyle(client);
|
||||||
fpb = Shavit_GetClientPB(client, istyle, track);
|
fpb = Shavit_GetClientPB(client, istyle, track);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Shavit_OnFinish(int client, int style, float time, int jumps, int track)
|
public void Shavit_OnFinish(int client, int style, float time, int jumps, int track) {
|
||||||
{
|
if (g_iNormalEnabled == 1) {
|
||||||
|
if (g_iT1Enabled == 1 || iTier != 1) {
|
||||||
if(g_iNormalEnabled == 1)
|
int fcredits = GetConVarInt(g_hNormalAmount) * iTier;
|
||||||
{
|
|
||||||
if(g_iT1Enabled == 1 || iTier != 1)
|
|
||||||
{
|
|
||||||
int fcredits = GetConVarInt(g_hNormalAmount)*iTier;
|
|
||||||
|
|
||||||
Store_SetClientCredits(client, Store_GetClientCredits(client) + fcredits);
|
Store_SetClientCredits(client, Store_GetClientCredits(client) + fcredits);
|
||||||
PrintToChat(client, "[\x04Store\x01] You have earned \x04%d\x01 credits for finishing this map.", fcredits);
|
PrintToChat(client, "[\x04Store\x01] You have earned \x04%d\x01 credits for finishing this map.", fcredits);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(g_iPBEnabled == 1)
|
if (g_iPBEnabled == 1) {
|
||||||
{
|
if (time < fpb) {
|
||||||
if(time<fpb){
|
|
||||||
|
|
||||||
int fcredits = GetConVarInt(g_hPBAmount)*iTier;
|
int fcredits = GetConVarInt(g_hPBAmount) * iTier;
|
||||||
|
|
||||||
Store_SetClientCredits(client, Store_GetClientCredits(client) + fcredits);
|
Store_SetClientCredits(client, Store_GetClientCredits(client) + fcredits);
|
||||||
PrintToChat(client, "[\x04Store\x01] You have earned \x04%d\x01 credits for breaking your Personal Best.", fcredits);
|
PrintToChat(client, "[\x04Store\x01] You have earned \x04%d\x01 credits for breaking your Personal Best.", fcredits);
|
||||||
|
@ -101,11 +94,9 @@ public void Shavit_OnFinish(int client, int style, float time, int jumps, int tr
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void Shavit_OnWorldRecord(int client, int style, float time, int jumps, int track)
|
public void Shavit_OnWorldRecord(int client, int style, float time, int jumps, int track) {
|
||||||
{
|
if (g_iWREnabled == 1) {
|
||||||
if(g_iWREnabled == 1)
|
int fcredits = GetConVarInt(g_hWrAmount) * iTier;
|
||||||
{
|
|
||||||
int fcredits = GetConVarInt(g_hWrAmount)*iTier;
|
|
||||||
|
|
||||||
Store_SetClientCredits(client, Store_GetClientCredits(client) + fcredits);
|
Store_SetClientCredits(client, Store_GetClientCredits(client) + fcredits);
|
||||||
PrintToChat(client, "[\x04Store\x01] You have earned \x04%d\x01 credits for break the world records.", fcredits);
|
PrintToChat(client, "[\x04Store\x01] You have earned \x04%d\x01 credits for break the world records.", fcredits);
|
||||||
|
|
Loading…
Reference in a new issue