Raised This Month: $51 Target: $400
 12% 

[CS:GO] ckSurf (1.18f, 24.11.2015)


Post New Thread Reply   
 
Thread Tools Display Modes
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 04-27-2017 , 12:45   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2561

Quote:
Originally Posted by TrappaTroopa View Post
Can you link the one for zeph's Store? I tried one in the past but it didn't work. I search for the one made by "yash" but I only found his Math credits and his Hunter Mode Credits plugins.
Search this Thread -> SearchTag = "Credits" -> scroll, scroll ->
https://forums.alliedmods.net/showpo...postcount=1908
__________________
coding & free software
shanapu is offline
TrappaTroopa
Senior Member
Join Date: Feb 2016
Old 04-27-2017 , 12:56   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2562

Quote:
Originally Posted by shanapu View Post
Search this Thread -> SearchTag = "Credits" -> scroll, scroll ->
https://forums.alliedmods.net/showpo...postcount=1908
OK yes I do remember this one and I did test it a couple of weeks ago. However it no longer works. The plugin loads fine no credits are given. Error logs don't show anything since plugin loads just fine. Confirmed by me and 1 other person earlier in this thread.

Last edited by TrappaTroopa; 04-27-2017 at 12:59.
TrappaTroopa is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 04-27-2017 , 13:09   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2563

Quote:
Originally Posted by TrappaTroopa View Post
OK yes I do remember this one and I did test it a couple of weeks ago. However it no longer works. The plugin loads fine no credits are given. Error logs don't show anything since plugin loads just fine. Confirmed by me and 1 other person earlier in this thread.
Try this for zephyrus store
PHP Code:
// Includes
#include <sourcemod>
#include <store>
#include <cksurf>

// Compiler Options
#pragma semicolon 1
#pragma newdecls required

ConVar gc_iCreditsNormal;
ConVar gc_iCreditsBonus;
ConVar gc_iCreditsPrac;

// Info
public Plugin myinfo 
{
    
name "[CKsurf] Store Credits Giver",
    
author "shanapu",
    
description "Give Credits for Zephs Store on finished map",
    
version "1.0",
    
url "https://github.com/shanapu/"
};

public 
void OnPluginStart()
{
    
gc_iCreditsNormal CreateConVar("sm_cksurfcredits_normal""50""How many credits for finishing map?"_true1.0);
    
gc_iCreditsBonus CreateConVar("sm_cksurfcredits_bonus""100""How many credits for finishing bonus?"_true1.0);
    
gc_iCreditsPrac CreateConVar("sm_cksurfcredits_practise""25""How many credits for finishing practise?"_true1.0);
}

public 
Action ckSurf_OnMapFinished(int clientfloat fRunTimechar sRunTime[54], int rankint total)
{
    if(!
IsValidClient(client))
    {
        return;
    }

    
Store_SetClientCredits(clientStore_GetClientCredits(client) + gc_iCreditsNormal.IntValue);

    
PrintToChat(client"\x04[Store]\x01 You have successfully earned %d cash for finishing this map."gc_iCreditsNormal.IntValue);
}

public 
Action ckSurf_OnBonusFinished(int clientfloat fRunTimechar sRunTime[54], int rankint totalint bonusid)
{    
    if(!
IsValidClient(client))
    {
        return;
    }

    
Store_SetClientCredits(clientStore_GetClientCredits(client) + gc_iCreditsBonus.IntValue);

    
PrintToChat(client"\x04[Store]\x01 You have successfully earned %d cash for finishing the bonus."gc_iCreditsBonus.IntValue);
}

public 
Action ckSurf_OnPracticeFinished(int clientfloat fRunTimechar sRunTime[54])
{
    if(!
IsValidClient(client))
    {
        return;
    }

    
Store_SetClientCredits(clientStore_GetClientCredits(client) + gc_iCreditsPrac.IntValue);

    
PrintToChat(client"\x04[Store]\x01 You have successfully earned %d cash for finishing the practise."gc_iCreditsPrac.IntValue);
}

bool IsValidClient(int clientbool bAlive false)
{
    if(
client >= && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && (bAlive == false || IsPlayerAlive(client)))
    {
        return 
true;
    }
    
    return 
false;

Attached Files
File Type: sp Get Plugin or Get Source (zeph-ck-credits.sp - 115 views - 2.2 KB)
File Type: smx zeph-ck-credits.smx (4.7 KB, 112 views)
__________________
coding & free software
shanapu is offline
TrappaTroopa
Senior Member
Join Date: Feb 2016
Old 04-27-2017 , 14:04   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2564

Quote:
Originally Posted by shanapu View Post
Try this for zephyrus store
PHP Code:
// Includes
#include <sourcemod>
#include <store>
#include <cksurf>

// Compiler Options
#pragma semicolon 1
#pragma newdecls required

ConVar gc_iCreditsNormal;
ConVar gc_iCreditsBonus;
ConVar gc_iCreditsPrac;

// Info
public Plugin myinfo 
{
    
name "[CKsurf] Store Credits Giver",
    
author "shanapu",
    
description "Give Credits for Zephs Store on finished map",
    
version "1.0",
    
url "https://github.com/shanapu/"
};

public 
void OnPluginStart()
{
    
gc_iCreditsNormal CreateConVar("sm_cksurfcredits_normal""50""How many credits for finishing map?"_true1.0);
    
gc_iCreditsBonus CreateConVar("sm_cksurfcredits_bonus""100""How many credits for finishing bonus?"_true1.0);
    
gc_iCreditsPrac CreateConVar("sm_cksurfcredits_practise""25""How many credits for finishing practise?"_true1.0);
}

public 
Action ckSurf_OnMapFinished(int clientfloat fRunTimechar sRunTime[54], int rankint total)
{
    if(!
IsValidClient(client))
    {
        return;
    }

    
Store_SetClientCredits(clientStore_GetClientCredits(client) + gc_iCreditsNormal.IntValue);

    
PrintToChat(client"\x04[Store]\x01 You have successfully earned %d cash for finishing this map."gc_iCreditsNormal.IntValue);
}

public 
Action ckSurf_OnBonusFinished(int clientfloat fRunTimechar sRunTime[54], int rankint totalint bonusid)
{    
    if(!
IsValidClient(client))
    {
        return;
    }

    
Store_SetClientCredits(clientStore_GetClientCredits(client) + gc_iCreditsBonus.IntValue);

    
PrintToChat(client"\x04[Store]\x01 You have successfully earned %d cash for finishing the bonus."gc_iCreditsBonus.IntValue);
}

public 
Action ckSurf_OnPracticeFinished(int clientfloat fRunTimechar sRunTime[54])
{
    if(!
IsValidClient(client))
    {
        return;
    }

    
Store_SetClientCredits(clientStore_GetClientCredits(client) + gc_iCreditsPrac.IntValue);

    
PrintToChat(client"\x04[Store]\x01 You have successfully earned %d cash for finishing the practise."gc_iCreditsPrac.IntValue);
}

bool IsValidClient(int clientbool bAlive false)
{
    if(
client >= && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && (bAlive == false || IsPlayerAlive(client)))
    {
        return 
true;
    }
    
    return 
false;

It Works! Thank you so much! How hard would it be for you to make it read from a config file? There are 2 values I woud like inside the config file.

First Time Map Completion = 100 credits (or whatever value I later decide)
Normal Map Completion = 15 credits (or whatever value I later decide)

I am capable of changing the value you already have set in the plugin and recompiling myself. It would just be easier to do it in it a config file.

If you do not have the time I completely understand. What you have already done is great and my Admins/players thank you!

Last edited by TrappaTroopa; 04-27-2017 at 14:07.
TrappaTroopa is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 04-27-2017 , 14:30   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2565

Quote:
Originally Posted by TrappaTroopa View Post
It Works! Thank you so much! How hard would it be for you to make it read from a config file? There are 2 values I woud like inside the config file.

First Time Map Completion = 100 credits (or whatever value I later decide)
Normal Map Completion = 15 credits (or whatever value I later decide)
Sorry, Cksurf don't have a native to check if this Completion is the first time. And I'm not really motivated to insert an sql query to check this.

Quote:
Originally Posted by TrappaTroopa View Post
I am capable of changing the value you already have set in the plugin and recompiling myself. It would just be easier to do it in it a config file.
just add:
Code:
sm_cksurfcredits_normal "50"
sm_cksurfcredits_bonus "100"
sm_cksurfcredits_practise "25"
to your gamemode_xxx.cfg or server.cfg

If you still insist in an extra config file I can add these cvars to plugin.store.cfg or make an extra .cfg file.

Quote:
Originally Posted by TrappaTroopa View Post
If you do not have the time I completely understand. What you have already done is great and my Admins/players thank you!
When you like what I do, consider in donating to Alliedmodders ;)
__________________
coding & free software

Last edited by shanapu; 04-27-2017 at 15:01.
shanapu is offline
SockerkakaN
Junior Member
Join Date: Apr 2017
Old 04-27-2017 , 16:40   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2566

I have this issue when i can't save zones, it just says that it failed.

Any solution?
SockerkakaN is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 04-27-2017 , 17:28   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2567

Quote:
Originally Posted by SockerkakaN View Post
I have this issue when i can't save zones, it just says that it failed.

Any solution?
Relevant error logs?? Whatever you posted before had nothing to do with cksurf.
__________________
sneaK is offline
TrappaTroopa
Senior Member
Join Date: Feb 2016
Old 04-28-2017 , 09:43   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2568

Quote:
Originally Posted by shanapu View Post
Sorry, Cksurf don't have a native to check if this Completion is the first time. And I'm not really motivated to insert an sql query to check this.


just add:
Code:
sm_cksurfcredits_normal "50"
sm_cksurfcredits_bonus "100"
sm_cksurfcredits_practise "25"
to your gamemode_xxx.cfg or server.cfg

If you still insist in an extra config file I can add these cvars to plugin.store.cfg or make an extra .cfg file.


When you like what I do, consider in donating to Alliedmodders ;)
That will do just fine. Thank you!
TrappaTroopa is offline
Dreamplay
Junior Member
Join Date: Apr 2017
Old 04-28-2017 , 16:41   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2569

Quote:
Originally Posted by Dreamplay View Post
So, I want to use ckSurf for a MG-server. As such, i want it to be played out in rounds. How do i enable so players respawn for 60 sec, then stop. And after 60 sec, and all players have died, a new round starts(basically only using the start, checkpoint, stop and point-system)?
Bump, im in a real hurry since our servers are down because of this. Sry.

Last edited by Dreamplay; 04-28-2017 at 16:42.
Dreamplay is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 04-28-2017 , 16:44   Re: [CS:GO] ckSurf (1.18f, 24.11.2015)
Reply With Quote #2570

Quote:
Originally Posted by Dreamplay View Post
Bump, im in a real hurry since our servers are down because of this. Sry.
cksurf isn't what you want to use in the application you're looking for. This would require several edits, and to be quite honest, would probably be an incredibly inefficient/hogging resource. I'd recommend looking for another, more simplistic timer that doesn't "handle everything" like cksurf does.
__________________

Last edited by sneaK; 04-28-2017 at 16:44.
sneaK is offline
Reply



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 20:46.


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