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.0, EntradaVIP, GetClientSerial(client))
}
public Action:event_PlayerSay(Handle:event, const String:name[], bool:dontBroadcast)
{
decl String:Texto[128];
GetEventString(event, "text", Texto, sizeof(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", URL, MOTDPANEL_TYPE_URL);
}
public Action:EntradaVIP(Handle:timer, any: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", URL, MOTDPANEL_TYPE_URL);
return Plugin_Handled;
}
__________________