Hello!
Im a beginner who started to learn sourcepawn like 1 week ago. My first project was to make a working vip menu wich includes a menu where u can find options to use sm_votekick and sm_voteban, I studied a little bit and i wrote a menu script wich has both of the options but now i dont know what i need to add to make those commands on the list really work when they are used.
php code:
PHP Code:
#include <sourcemod>
#pragma semicolon 1
#pragma newdecls required
public void OnPluginStart() {
RegConsoleCmd("sm_vip", Command_VIP, "Diplays a VIP menu");
}
public Action Command_VIP(int client, int args) {
Menu menu = new Menu(Menu_Callback);
menu.SetTitle("Vip Menu :)");
menu.AddItem("Votekick", "Votekick");
menu.AddItem("Voteban", "Voteban");
menu.Display(client, 30);
return Plugin_Handled;
}
public int Menu_Callback(Menu menu, MenuAction action, int param1, int param2)
{
switch (action) {
case MenuAction_Select:
{
char item[32];
menu.GetItem(param2, item, sizeof(item));
if (StrEqual(item, "Votekick")) {
}
else if (StrEqual(item, "Voteban")) {
}
}
case MenuAction_End:
{
delete menu;
}
}
}
I would appreciate any help to get this working!