Raised This Month: $32 Target: $400
 8% 

Solved Help with a code.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alex123pavlov
Member
Join Date: Jun 2018
Location: Moscow
Old 08-04-2018 , 16:34   Help with a code.
Reply With Quote #1

Good afternoon. You can add function when kikat the player from this plug-in that wrote all to a chat for what it kiknut him.

Code:
public OnPluginStart()
{
g_hCvarMethod = CreateConVar("sm_leftright_method", "2");
HookConVarChange(g_hCvarMethod, ConVarChanged_Method);

g_iMethod = GetConVarInt(g_hCvarMethod);
}

public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
{
if(buttons & IN_LEFT || buttons & IN_RIGHT)
{
switch(g_iMethod)
{
case 1:
{
new acttime = GetTime();
if(g_PlayerTime[client] < acttime-1)
{
g_PlayerLimit[client]++;

if(g_PlayerLimit[client] >= CHECKLIMIT)
{
PrintToChatAll("")

g_PlayerLimit[client] = 0;
}
g_PlayerTime[client] = acttime;
}
}
case 2:
{
KickClient(client, "");
}
}
}
}

public ConVarChanged_Method(Handle:convar, const String:oldValue[], const String:newValue[])
{
switch(StringToInt(newValue))
{
case 1:
{
g_iMethod = 1;
}
case 2:
{
g_iMethod = 2;
}
default:
{
g_iMethod = 1;
}
}
}

Last edited by alex123pavlov; 08-06-2018 at 18:51. Reason: Restored post + solved tag
alex123pavlov is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 08-05-2018 , 00:53   Re: Help with a code.
Reply With Quote #2

do what now?
__________________
ddhoward is offline
xXDeathreusXx
Veteran Member
Join Date: Mar 2013
Location: pPlayer->GetOrigin();
Old 08-05-2018 , 01:10   Re: Help with a code.
Reply With Quote #3

You did what with your kit kat?
__________________
Plugins|Profile
Requests closed

I'm a smartass by nature, get used to it
xXDeathreusXx 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 06:31.


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