Hello,
PHP Code:
new Handle:g_hTimeBan = INVALID_HANDLE;
new String:g_sIssue[MAXPLAYERS + 1][32];
new String:g_sTarget[MAXPLAYERS + 1][32];
new String:g_sCaller[MAXPLAYERS + 1][32];
new String:g_sCallerAuth[MAXPLAYERS + 1][32];
new String:g_sCallerName[MAXPLAYERS + 1][32];
new g_iMessageSent[MAXPLAYERS + 1] = 0;
public OnPluginStart()
{
g_hTimeBan = CreateConVar("vb_timeban","60.0","If ban is enabled, the amount of time in minutes to ban the offender.");
AutoExecConfig(true,"VoteBlocker");
AddCommandListener(VoteStart,"callvote");
}
public Action:VoteStart(client,const String:command[],argc)
{
if (GetConVarInt(g_hEnable) == 1)
{
GetCmdArg(1,g_sIssue[client],sizeof(g_sIssue[]));
GetCmdArg(2,g_sTarget[client],sizeof(g_sTarget[]));
Format(g_sCaller[client],sizeof(g_sCaller[]),"%s",client);
GetClientAuthString(client,g_sCallerAuth[client],sizeof(g_sCallerAuth[]));
GetClientName(client,g_sCallerName[client],sizeof(g_sCallerName[]));
new target = GetClientOfUserId(StringToInt(g_sTarget[client]));
VoteStringsToLower(client);
if(!CheckCommandAccess(client,g_sIssue[client],ADMFLAG_RESERVATION,true))
{
if (StrEqual(g_sIssue[client],"kick") && (GetConVarInt(g_hKickImmunity) > 0) && IsClientImmune(target))
{
PrintToChat(client,"%s You cannot kick that player (Admin or member Community)!",PREFIX);
PrintToChat(target,"%s %s tried to kick you!",PREFIX,g_sCallerName[client]);
if (GetConVarInt(g_hKickImmunity) == 2)
{
KickCaller(client);
new Float:banTime = GetConVarFloat(g_hTimeBan);
BanClient(g_sCallerName[client], Float:banTime, BANFLAG_AUTO, "Temp Ban: You cannot kick that player", "Temp Ban: You cannot kick that player", "sm_ban", g_sCallerName[client]);
}
if (GetConVarInt(g_hLog) == 1)
{
LogBlockedVote(client);
}
return Plugin_Handled;
}
return Plugin_Continue;
}
return Plugin_Continue;
}
return Plugin_Continue;
}
return:
Quote:
error 035: argument type mismatch (argument 1)
|
for this line
BanClient...
How to fix please?
Sincerely,
Original plugin: Vote Blocker