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

Need help for my panel


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mikize
Member
Join Date: Nov 2014
Old 11-22-2014 , 10:41   Need help for my panel
Reply With Quote #1

Hi, I'm a starter in sourcepawn and i would like to make a panel where everythings is blank so I can do this but i wan't it to display when the player connect to the server so i tried this

PHP Code:
#include <sourcemod>
#include <cstrike>
#include <adminmenu> 

public OnPluginStart()
{
    
HookEvent("player_respawned"test_panel);
}
 
public 
PanelHandler1(Handle:menuMenuAction:actionparam1param2)
{
    if (
action == MenuAction_Select)
    {
        
PrintToConsole(param1""param2);
    } else if (
action == MenuAction_Cancel) {
        
PrintToServer(""param1param2);
    }
}

public 
Action:test_panel(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
userid GetEventInt(event"userid"); // Get player #userid from event player_death
    
new client GetClientOfUserId(userid); // Get client index by #userid
    
new Handle:panel CreatePanel();
    
SetPanelTitle(panel"Test Panel");
    
DrawPanelItem(panel"Test2"ITEMDRAW_RAWLINE);
    
DrawPanelItem(panel"Test1"ITEMDRAW_RAWLINE);
    
SendPanelToClient(panelclientPanelHandler199999);

but it didn't work so if someone can help me that'll be cool. I'm on CS:GO.

edit : I would like the panel to update every second if possible (for changing a date or something)

Last edited by mikize; 11-22-2014 at 12:08. Reason: adding text
mikize is offline
mikize
Member
Join Date: Nov 2014
Old 11-24-2014 , 14:05   Re: Need help for my panel
Reply With Quote #2

Can I have some help on it ? Realy need :/
mikize is offline
h3bus
AlliedModders Donor
Join Date: Nov 2013
Old 11-24-2014 , 18:12   Re: Need help for my panel
Reply With Quote #3

I think the event is player_spawn

Didn't read the rest.
h3bus is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 11-24-2014 , 21:35   Re: Need help for my panel
Reply With Quote #4

You can set time to 0 instead of 99999 if you dont want it to timeout. Indeed player_spawn instead of player_respawned
Mathias. is offline
mikize
Member
Join Date: Nov 2014
Old 11-25-2014 , 13:25   Re: Need help for my panel
Reply With Quote #5

on the wiki it's say player_spawned and I tried and my panel isn't here ...
mikize is offline
h3bus
AlliedModders Donor
Join Date: Nov 2013
Old 11-26-2014 , 03:05   Re: Need help for my panel
Reply With Quote #6

https://wiki.alliedmods.net/Generic_Source_Events
I develop a DM plugin an trust me, it is player_spawn. Don't know when player_spawned is fired (it is listed as a CSGO event).

Last edited by h3bus; 11-26-2014 at 03:06.
h3bus is offline
mikize
Member
Join Date: Nov 2014
Old 11-26-2014 , 06:23   Re: Need help for my panel
Reply With Quote #7

https://wiki.alliedmods.net/Counter-...player_spawned

Here is what i found and i tried and nothing :'(
mikize is offline
h3bus
AlliedModders Donor
Join Date: Nov 2013
Old 11-26-2014 , 08:16   Re: Need help for my panel
Reply With Quote #8

Did you even tried with player_spawn?
h3bus is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 11-26-2014 , 08:18   Re: Need help for my panel
Reply With Quote #9

Net_showevents 1
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
mikize
Member
Join Date: Nov 2014
Old 11-26-2014 , 13:04   Re: Need help for my panel
Reply With Quote #10

yes i tried and unknow command for Net_showevents 1

Last edited by mikize; 11-26-2014 at 13:05. Reason: adding text
mikize 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 20:02.


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