Raised This Month: $51 Target: $400
 12% 

[CSGO] Vip Plugin help!


Post New Thread Reply   
 
Thread Tools Display Modes
Krotis
Senior Member
Join Date: Aug 2012
Old 06-27-2015 , 19:37   Re: [CSGO] Vip Plugin help!
Reply With Quote #11

Quote:
Originally Posted by arne1288 View Post
This is a forum where others help you with your scripting issue.

It is not a "code giveaway"-section where you will be spoon-fed with solutions.
Yes I know, Im asking here for help cause I cant seem to find a sulotion to my problem.
Krotis is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 08-01-2016 , 15:22   Re: [CSGO] Vip Plugin help!
Reply With Quote #12

Here:
Note: It's not tested yet but it should do the job
PHP Code:
#include <sourcemod>
#include <sdktools> 
#pragma newdecls required
 
public Plugin myinfo =
{
    
name "VIPMenu",
    
author "BraveFox",
    
description "",
    
version "1.0",
    
url "forums.alliedmods.net",
};
 
public 
void OnPluginStart()
{
   
RegConsoleCmd("sm_vip"vipmenu);
}
 
public 
Action vipmenu(int clientint args)
{
    if(!
IsValidClient(client))
        return 
Plugin_Handled;
       
    
Handle menu CreateMenu(MenuHandelr);
    
SetMenuTitle(menu"My first");
 
    
AddMenuItem(menu"trails""Trails");
    
AddMenuItem(menu"hats""Hats");
    
AddMenuItem(menu"wskins""Weapon Skins");
    
AddMenuItem(menu"knife""Knife Menu"); 
    
DisplayMenu(menuclient15);
    return 
Plugin_Continue;
}
 
public 
int MenuHandelr(Menu menuMenuAction actionint clientint itemNum)
{
    if(
action == MenuAction_End || !IsValidClient(client))
        
CloseHandle(menu);
   
    if(
action == MenuAction_Select)
    {
        switch(
itemNum)
        {
            case 
0:
            {
                 
FakeClientCommand(client"say /trails");
            }
            case 
1:
            {
                
FakeClientCommand(client"say /hats");
            }
            case 
2:
            {
                
FakeClientCommand(client"say /ws");
            }
            case 
3:
            {
                
FakeClientCommand(client"say /knife");
            }
        }
    }
}
stock bool IsValidClient(int clientbool bAlive false)
{
    if(
client >= && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && (bAlive == false || IsPlayerAlive(client)))
    {
        return 
true;
    }
    return 
false;

__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests

Last edited by BraveFox; 08-01-2016 at 15:23.
BraveFox is offline
Farbror Godis
AlliedModders Donor
Join Date: Feb 2016
Old 08-01-2016 , 15:24   Re: [CSGO] Vip Plugin help!
Reply With Quote #13

You realise this thread is over a year old right?
__________________
Farbror Godis is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 08-01-2016 , 16:14   Re: [CSGO] Vip Plugin help!
Reply With Quote #14

Quote:
Originally Posted by Farbror Godis View Post
You realise this thread is over a year old right?
I didn't see the date lol
__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests
BraveFox is offline
Reply



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 14:31.


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