[CS:GO] Shavit-Credits.

burden boy

Участник
Сообщения
98
Реакции
4
Здравствуйте! Попробывал перевести shavit-credits с шопа зефира (zephyrus) на шоп Frozdark'a.

Попробовал исправить, но получил еще ошибки. Надеюсь на вашу помощь. (прикладываю inc shavit таймера)

PHP:
#pragma semicolon 1

#include <sourcemod>
#include <shavit>
#include <shop>

#pragma newdecls required

ConVar g_cvEnabled = null;
ConVar g_cvFinishCredits = null;
ConVar g_cvWorldRecordCredits = null;

public void OnPluginStart()
{
    g_cvEnabled = CreateConVar("shavit_credits_enable", "1", "Should players receive credits for finishing maps and beating world records?", 0, true, 0.0, true, 1.0);
    g_cvFinishCredits = CreateConVar("shavit_credits_finish", "500", "How many credits should players receive for finishing a map?", 0, true, 0.0);
    g_cvWorldRecordCredits = CreateConVar("shavit_credits_worldrecord", "1000", "How many credits should players receive for beating a world record?", 0, true, 0.0);
    
    AutoExecConfig();
}

public void Shavit_OnFinish(int client, BhopStyle style, float time, int jumps);
{
    if(g_cvEnabled.BoolValue)
    {
        Shop_SetClientCredits(client, Shop_GetClientCredits(client) + g_cvFinishCredits.IntValue);
        PrintToChat(client, "[Shop] Вы получили %d кредитов за прохождение карты.", g_cvFinishCredits.IntValue);
    }
}

public void Shavit_OnWorldRecord(int client, BhopStyle style, float time, int jumps);
{
    if(g_cvEnabled.BoolValue)
    {
        Shop_SetClientCredits(client, Shop_GetClientCredits(client) + g_cvWorldRecordCredits.IntValue);
        PrintToChat(client, "[Shop] Вы получили %d кредитов за поставленный рекорд.", g_cvWorldRecordCredits.IntValue);
    }
}
 

Вложения

  • shavit.inc
    8.2 КБ · Просмотры: 35

burden boy

Участник
Сообщения
98
Реакции
4
человек не хочет ходить по 30 картам и заморачиваться с установкой подарков.
Как бы, тут идет привязка к shavit таймеру.
У меня везде расставлены точки, изначально он был под шоп зефира, но у меня от фроздарка.
 

Boeing 767

заскамили мамонта ни за что, ни про что
Сообщения
524
Реакции
913
PHP:
#pragma semicolon 1

#include <shop>
#include <shavit>

#pragma newdecls required

ConVar g_cvEnabled = null;
ConVar g_cvFinishCredits = null;
ConVar g_cvWorldRecordCredits = null;

public void OnPluginStart()
{
    g_cvEnabled = CreateConVar("shavit_credits_enable", "1", "Should players receive credits for finishing maps and beating world records?", 0, true, 0.0, true, 1.0);
    g_cvFinishCredits = CreateConVar("shavit_credits_finish", "50", "How many credits should players receive for finishing a map?", 0, true, 0.0);
    g_cvWorldRecordCredits = CreateConVar("shavit_credits_worldrecord", "100", "How many credits should players receive for beating a world record?", 0, true, 0.0);
    
    AutoExecConfig();
}

public void Shavit_OnFinish(int client, int style, float time, int jumps, int strafes, float sync)
{
    if(g_cvEnabled.BoolValue)
    {
        Shop_GiveClientCredits(client, g_cvFinishCredits.IntValue, IGNORE_FORWARD_HOOK);
        PrintToChat(client, "[Shop] Вы получили %d кредитов за прохождение карты.", g_cvFinishCredits.IntValue);
    }
}

public void Shavit_OnWorldRecord(int client, int style, float time, int jumps, int strafes, float sync)
{
    if(g_cvEnabled.BoolValue)
    {
        Shop_GiveClientCredits(client, g_cvWorldRecordCredits.IntValue, IGNORE_FORWARD_HOOK);
        PrintToChat(client, "[Shop] Вы получили %d кредитов за поставленный рекорд.", g_cvWorldRecordCredits.IntValue);
    }
}
 

burden boy

Участник
Сообщения
98
Реакции
4
PHP:
#pragma semicolon 1

#include <shop>
#include <shavit>

#pragma newdecls required

ConVar g_cvEnabled = null;
ConVar g_cvFinishCredits = null;
ConVar g_cvWorldRecordCredits = null;

public void OnPluginStart()
{
    g_cvEnabled = CreateConVar("shavit_credits_enable", "1", "Should players receive credits for finishing maps and beating world records?", 0, true, 0.0, true, 1.0);
    g_cvFinishCredits = CreateConVar("shavit_credits_finish", "50", "How many credits should players receive for finishing a map?", 0, true, 0.0);
    g_cvWorldRecordCredits = CreateConVar("shavit_credits_worldrecord", "100", "How many credits should players receive for beating a world record?", 0, true, 0.0);
   
    AutoExecConfig();
}

public void Shavit_OnFinish(int client, int style, float time, int jumps, int strafes, float sync)
{
    if(g_cvEnabled.BoolValue)
    {
        Shop_GiveClientCredits(client, g_cvFinishCredits.IntValue, IGNORE_FORWARD_HOOK);
        PrintToChat(client, "[Shop] Вы получили %d кредитов за прохождение карты.", g_cvFinishCredits.IntValue);
    }
}

public void Shavit_OnWorldRecord(int client, int style, float time, int jumps, int strafes, float sync)
{
    if(g_cvEnabled.BoolValue)
    {
        Shop_GiveClientCredits(client, g_cvWorldRecordCredits.IntValue, IGNORE_FORWARD_HOOK);
        PrintToChat(client, "[Shop] Вы получили %d кредитов за поставленный рекорд.", g_cvWorldRecordCredits.IntValue);
    }
}
upload_2017-8-30_19-52-29.png
 

Boeing 767

заскамили мамонта ни за что, ни про что
Сообщения
524
Реакции
913
Ядро таймера старое видимо у вас, пробуйте так:
PHP:
#pragma semicolon 1

#include <shop>
#include <shavit>

#pragma newdecls required

ConVar g_cvEnabled = null;
ConVar g_cvFinishCredits = null;
ConVar g_cvWorldRecordCredits = null;

public void OnPluginStart()
{
    g_cvEnabled = CreateConVar("shavit_credits_enable", "1", "Should players receive credits for finishing maps and beating world records?", 0, true, 0.0, true, 1.0);
    g_cvFinishCredits = CreateConVar("shavit_credits_finish", "50", "How many credits should players receive for finishing a map?", 0, true, 0.0);
    g_cvWorldRecordCredits = CreateConVar("shavit_credits_worldrecord", "100", "How many credits should players receive for beating a world record?", 0, true, 0.0);
    
    AutoExecConfig();
}

public void Shavit_OnFinish(int client, BhopStyle style, float time, int jumps)
{
    if(g_cvEnabled.BoolValue)
    {
        Shop_GiveClientCredits(client, g_cvFinishCredits.IntValue, IGNORE_FORWARD_HOOK);
        PrintToChat(client, "[Shop] Вы получили %d кредитов за прохождение карты.", g_cvFinishCredits.IntValue);
    }
}

public void Shavit_OnWorldRecord(int client, BhopStyle style, float time, int jumps)
{
    if(g_cvEnabled.BoolValue)
    {
        Shop_GiveClientCredits(client, g_cvWorldRecordCredits.IntValue, IGNORE_FORWARD_HOOK);
        PrintToChat(client, "[Shop] Вы получили %d кредитов за поставленный рекорд.", g_cvWorldRecordCredits.IntValue);
    }
}
 

burden boy

Участник
Сообщения
98
Реакции
4
Ядро таймера старое видимо у вас, пробуйте так:
PHP:
#pragma semicolon 1

#include <shop>
#include <shavit>

#pragma newdecls required

ConVar g_cvEnabled = null;
ConVar g_cvFinishCredits = null;
ConVar g_cvWorldRecordCredits = null;

public void OnPluginStart()
{
    g_cvEnabled = CreateConVar("shavit_credits_enable", "1", "Should players receive credits for finishing maps and beating world records?", 0, true, 0.0, true, 1.0);
    g_cvFinishCredits = CreateConVar("shavit_credits_finish", "50", "How many credits should players receive for finishing a map?", 0, true, 0.0);
    g_cvWorldRecordCredits = CreateConVar("shavit_credits_worldrecord", "100", "How many credits should players receive for beating a world record?", 0, true, 0.0);
   
    AutoExecConfig();
}

public void Shavit_OnFinish(int client, BhopStyle style, float time, int jumps)
{
    if(g_cvEnabled.BoolValue)
    {
        Shop_GiveClientCredits(client, g_cvFinishCredits.IntValue, IGNORE_FORWARD_HOOK);
        PrintToChat(client, "[Shop] Вы получили %d кредитов за прохождение карты.", g_cvFinishCredits.IntValue);
    }
}

public void Shavit_OnWorldRecord(int client, BhopStyle style, float time, int jumps)
{
    if(g_cvEnabled.BoolValue)
    {
        Shop_GiveClientCredits(client, g_cvWorldRecordCredits.IntValue, IGNORE_FORWARD_HOOK);
        PrintToChat(client, "[Shop] Вы получили %d кредитов за поставленный рекорд.", g_cvWorldRecordCredits.IntValue);
    }
}
Работает, спасибо!
 

Yooki

Добрая душа
Сообщения
473
Реакции
169
PHP:
#pragma semicolon 1

#include <shop>
#include <shavit>

#pragma newdecls required

ConVar g_cvEnabled = null;
ConVar g_cvFinishCredits = null;
ConVar g_cvWorldRecordCredits = null;

public void OnPluginStart()
{
    g_cvEnabled = CreateConVar("shavit_credits_enable", "1", "Should players receive credits for finishing maps and beating world records?", 0, true, 0.0, true, 1.0);
    g_cvFinishCredits = CreateConVar("shavit_credits_finish", "50", "How many credits should players receive for finishing a map?", 0, true, 0.0);
    g_cvWorldRecordCredits = CreateConVar("shavit_credits_worldrecord", "100", "How many credits should players receive for beating a world record?", 0, true, 0.0);
   
    AutoExecConfig();
}

public void Shavit_OnFinish(int client, int style, float time, int jumps, int strafes, float sync)
{
    if(g_cvEnabled.BoolValue)
    {
        Shop_GiveClientCredits(client, g_cvFinishCredits.IntValue, IGNORE_FORWARD_HOOK);
        PrintToChat(client, "[Shop] Вы получили %d кредитов за прохождение карты.", g_cvFinishCredits.IntValue);
    }
}

public void Shavit_OnWorldRecord(int client, int style, float time, int jumps, int strafes, float sync)
{
    if(g_cvEnabled.BoolValue)
    {
        Shop_GiveClientCredits(client, g_cvWorldRecordCredits.IntValue, IGNORE_FORWARD_HOOK);
        PrintToChat(client, "[Shop] Вы получили %d кредитов за поставленный рекорд.", g_cvWorldRecordCredits.IntValue);
    }
}
Как не меняю 50 и 100, все равно именно это значение и дает
--- Добавлено позже ---
Как не меняю 50 и 100, все равно именно это значение и дает
смог
 

Rostu

Добрая душа
Сообщения
986
Реакции
623
@Yooki, Где вы меняете? По идеи должен быть появиться конфиг в cfg/sourcemod/plugin.названиПлагина
 
Сверху Снизу