Having a problem with my code, anyone can help me?
This is the Error: vip-free.smx: Native "VIP_GiveClientVIP" was not found
This is the CODE:
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <vip_core>
#define START_TIME 22.0 // ora la care incepe
#define END_TIME 7.5 // ora la care se termina
#define duratavip 14400 // durata vip in secunde
char g_Group[12] = "vip-free" // aici pui numele grupul vip
#pragma newdecls required
bool bIsEvent;
public void OnPluginStart()
{
CreateTimer(1.0, Timer_Check, _, TIMER_REPEAT);
bIsEvent = false;
}
public Action Timer_Check(Handle pTimer)
{
char strHours[3], strMinutes[3];
FormatTime(strHours, sizeof(strHours), "%H");
FormatTime(strMinutes, sizeof(strMinutes), "%M");
float hours = StringToFloat(strHours)
float minutes = StringToFloat(strMinutes);
hours += (minutes/60)
if (hours > START_TIME && hours < END_TIME)
{
PrintCenterTextAll("FREE VIP EVENT ON. RECONNECT TO GET FREE VIP");
bIsEvent = true;
CreateTimer(46800.0, Time_RemoveBool);
for(int iClient = 1; iClient <= MaxClients; iClient++)
{
VIP_GiveClientVIP(-1, iClient, duratavip, g_Group, true);
}
}
}
public Action Time_RemoveBool(Handle _Timer)
{
bIsEvent = false;
}
public void OnClientPutInServer(int iClient)
{
if(bIsEvent)
{
if(!VIP_IsClientVIP(iClient))
{
VIP_GiveClientVIP(-1, iClient, duratavip, g_Group);
PrintToChat(iClient, "[TEST] VIP EVENT ON! YOU HAVE FREE VIP FREE!");
}
}
}
__________________