View Single Post
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-31-2022 , 11:50   Re: user will receive an msay after typing a command
Reply With Quote #5

PHP Code:
public void OnPluginStart()
{
    
RegConsoleCmd("sm_nsp"nsp);
}

public 
Action nsp(int clientint args)
{
    if(!
client || !IsClientInGame(client) || IsClientInKickQueue(client))
        return 
Plugin_Handled;

    
CreateTimer(2.5delayGetClientUserId(client));

    return 
Plugin_Handled;
}

public 
Action delay(Handle timerany data)
{
    
int client GetClientOfUserId(data);
    
    if(!
client || !IsClientInGame(client) || IsClientInKickQueue(client))
        return 
Plugin_Continue;

    
Panel mSayPanel = new Panel();
    
mSayPanel.SetTitle("Congratulations!");
    
mSayPanel.DrawItem(""ITEMDRAW_SPACER);
    
mSayPanel.DrawText("The Zip password is 2525");
    
mSayPanel.DrawItem(""ITEMDRAW_SPACER);
    
mSayPanel.CurrentKey GetMaxPageItems(mSayPanel.Style);
    
mSayPanel.DrawItem("Exit"ITEMDRAW_CONTROL);
    
mSayPanel.Send(clientHandler_DoNothing10);

    return 
Plugin_Continue;
}


public 
int Handler_DoNothing(Menu menuMenuAction actionint param1int param2)
{
    
/* Do nothing */
    
return 0;

__________________
Do not Private Message @me
Bacardi is offline