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

EDIT - plugin turbo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Grafitosky
Member
Join Date: Jul 2020
Old 11-25-2020 , 05:51   EDIT - plugin turbo
Reply With Quote #1

Hello, I have a turbo plugin and I want to be able to use it every 60 seconds, now I have only a well-done message that displays that in X time it can be used. Can someone change it so that it can be used every 60 seconds?



Code:
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <sdkhooks>
#include <colorvariables>

public Plugin myinfo = {
    name        = "Turbo na 7 sekund dla vipa",
    author      = "",
    description = "Komenda dla vipa, ktora daje turbo na 7 sekund",
    version     = "0.0.0",
    url         = "-----"
};

#define IsValidAlive(%1) ( 1 <= %1 <= MaxClients && IsClientInGame(%1) && IsPlayerAlive(%1) )

int g_iZmiennaPrzetrzymujacaCzasAbySprawdzacCzyMoznaUzycKomendy[MAXPLAYERS+1];


public void OnMapStart() {
    for(int i = 0; i < MaxClients; i++)
        g_iZmiennaPrzetrzymujacaCzasAbySprawdzacCzyMoznaUzycKomendy[i] = 0;
}
public void OnPluginStart() {
	RegAdminCmd("sm_vturbo", CMD_SKILL, ADMFLAG_CUSTOM6);
}

public Action CMD_SKILL(int client, int args) {
    
    if(IsValidAlive(client))
	{
		SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", 1.4);
		CreateTimer(7.0, TIMER_SKILL, GetClientUserId(client));
	}
		 if(g_iZmiennaPrzetrzymujacaCzasAbySprawdzacCzyMoznaUzycKomendy[client] >= GetTime()) {
        PrintToChat(client, " \x02 Aby użyć jeszcze raz turbo, poczekaj \x06 %i \x02 sekund!", g_iZmiennaPrzetrzymujacaCzasAbySprawdzacCzyMoznaUzycKomendy[client] - GetTime());
        return Plugin_Handled;
	}
    g_iZmiennaPrzetrzymujacaCzasAbySprawdzacCzyMoznaUzycKomendy[client] = GetTime()+60;
    return Plugin_Handled;
}

public Action TIMER_SKILL(Handle hTimer, int userid)
{
	int client = GetClientOfUserId(userid);
	
	if(IsValidAlive(client))
	{
		SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", 1.0);
	}
}
Grafitosky is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 11-25-2020 , 10:02   Re: EDIT - plugin turbo
Reply With Quote #2

I write this purely and willingly from my heart and love.. i promise, no funny business.

P/S: I dont have CS:S installed so i cant test.

Edit; my instinct tell me you probably didn't need
- #include <cstrike>
- #include <sdkhooks>

Spoiler
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 11-25-2020 at 11:04.
GsiX is offline
Grafitosky
Member
Join Date: Jul 2020
Old 12-20-2020 , 10:18   Re: EDIT - plugin turbo
Reply With Quote #3

Quote:
Originally Posted by GsiX View Post
I write this purely and willingly from my heart and love.. i promise, no funny business.

P/S: I dont have CS:S installed so i cant test.

Edit; my instinct tell me you probably didn't need
- #include <cstrike>
- #include <sdkhooks>

Spoiler

sometimes the reset time does not count pls help
Grafitosky is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-21-2020 , 04:53   Re: EDIT - plugin turbo
Reply With Quote #4

Try this awesome turbo.. i added cvar so you can finetune it much better.

and... no funny business. i promise. :fingercross: :fingercross:

Spoiler


Edit: I didn't test, so hopefully it work as intended.
.
Attached Files
File Type: sp Get Plugin or Get Source (vturbo.sp - 37 views - 6.3 KB)
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 12-21-2020 at 05:02.
GsiX is offline
Reply


Thread Tools
Display Modes

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 11:07.


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