Raised This Month: $344 Target: $400
 86%   Almost there!

Solved [Problem] VIP Free System


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
G0dFulL.
Member
Join Date: Jun 2020
Location: Romania
Old 07-11-2020 , 11:22   [Problem] VIP Free System
#1

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.0Timer_Check_TIMER_REPEAT);
    
    
bIsEvent false;
}

public 
Action Timer_Check(Handle pTimer)
{
   
    
char strHours[3], strMinutes[3];
    
FormatTime(strHourssizeof(strHours), "%H");
    
FormatTime(strMinutessizeof(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.0Time_RemoveBool);
        
        for(
int iClient 1iClient <= MaxClientsiClient++)
        {
            
VIP_GiveClientVIP(-1iClientduratavipg_Grouptrue);
        }
    }
    
}

public 
Action Time_RemoveBool(Handle _Timer)
{
    
bIsEvent false;
}

public 
void OnClientPutInServer(int iClient)
{
    if(
bIsEvent)
    {
        if(!
VIP_IsClientVIP(iClient))
        {
            
VIP_GiveClientVIP(-1iClientduratavipg_Group);
            
PrintToChat(iClient"[TEST] VIP EVENT ON! YOU HAVE FREE VIP FREE!");
        }
    }

__________________
My Discord: G0dFulL#4405 | My Community

Last edited by DarkDeviL; 07-11-2020 at 15:24. Reason: Restore to previous version.
G0dFulL. is offline
Closed Thread


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 05:05.


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