Raised This Month: $ Target: $400
 0% 

What I did wrong?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
skz
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 03-09-2015 , 12:14   What I did wrong?
Reply With Quote #1

My plugin doesn't work, I wanted to open a motd whanever someone type /vip or 30 seconds after someone joins the server.

PHP Code:
#include <sourcemod>

public Plugin:myinfo 
{
    
name "VIP",
    
author "Skatz",
    
description "VIP CS:GO",
    
version "1.0",
    
url "warStation.pt"
}

public 
OnPluginStart()
{
    
HookEvent("player_say"event_PlayerSay);
}

public 
OnClientPutInServer(client)
{
    
CreateTimer(30.0EntradaVIPGetClientSerial(client))
}

public 
Action:event_PlayerSay(Handle:event, const String:name[], bool:dontBroadcast)
{
    
decl String:Texto[128];
    
    
GetEventString(event"text"Textosizeof(Texto));
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
    if (
StrEqual(Texto"/vip"))
    {
        
MotdVIP(client)
    }
    


public 
MotdVIP(client)
{
    new const 
String:URL[] = "http://warstation.pt/csgo/comprarvip.html"    
    
ShowMOTDPanel(client"[wS] Comprar VIP"URLMOTDPANEL_TYPE_URL);
}

public 
Action:EntradaVIP(Handle:timerany:serial)
{
    new 
client GetClientFromSerial(serial);
    
    if (
client == 0)
    {
        return 
Plugin_Stop;
    }
    
    new const 
String:URL[] = "http://warstation.pt/csgo/comprarvip.html"    
    
ShowMOTDPanel(client"[wS] Comprar VIP"URLMOTDPANEL_TYPE_URL);
    
    return 
Plugin_Handled;

__________________

Last edited by skz; 03-09-2015 at 12:32.
skz is offline
 



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


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