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

Player connecten to server autostart "sm_models"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ballerman23
Member
Join Date: Mar 2006
Old 08-10-2008 , 07:47   Player connecten to server autostart "sm_models"
Reply With Quote #1

Sorry my Englisch

then Player connecten to server team auswahl, danach in console "sm_models" ausführen automatisch

geht das

this error

#pragma semicolon 1
#include <sourcemod>

public Plugin:myinfo =
{
name = "CommandExec",
author = "WebDestroya",
description = "Runs a command at each round",
version = "1.0",
url = "http://mitchdb.com/"
};

public OnPluginStart()
{
HookEvent("teamplay_round_start", Event_RoundStart);
}

public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
clientCommand("sm_models");
return Plugin_Continue;
}
Ballerman23 is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 08-10-2008 , 08:07   Re: Player connecten to server autostart "sm_models"
Reply With Quote #2

PHP Code:
clientCommand("sm_models"); 
to

PHP Code:
ClientCommand(client"sm_models"); 
client = person to use command

Don't know how to get the client though =/

Last edited by Lebson506th; 08-10-2008 at 08:09.
Lebson506th is offline
Ballerman23
Member
Join Date: Mar 2006
Old 08-10-2008 , 08:16   Re: Player connecten to server autostart "sm_models"
Reply With Quote #3

Your plugin failed to compile! Read the errors below:

SourcePawn Compiler 1.0.2.2138
Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC

/home/groups/sourcemod/upload_tmp/php4hkHSO.sp(20) : error 017: undefined symbol "client"

1 Error.
Ballerman23 is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 08-10-2008 , 09:07   Re: Player connecten to server autostart "sm_models"
Reply With Quote #4

PHP Code:
#pragma semicolon 1
#include <sourcemod>

public Plugin:myinfo =
{
    
name "CommandExec",
    
author "WebDestroya",
    
description "Runs a command at each round",
    
version "1.0",
    
url "http://mitchdb.com/"
};

public 
OnPluginStart()
{
    
HookEvent("teamplay_round_start"Event_RoundStart);
}

public 
Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
    for(new 
1i<= GetMaxClients(); i++)
        
ClientCommand(i"sm_models");

    return 
Plugin_Continue;

Lebson506th is offline
Ballerman23
Member
Join Date: Mar 2006
Old 08-10-2008 , 09:19   Re: Player connecten to server autostart "sm_models"
Reply With Quote #5

also wenn ich alleine connecte kommt das menu nicht beim joinen

schade,, bin am verzweifeln, aber irgendwie gehts nich
Ballerman23 is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 08-10-2008 , 11:19   Re: Player connecten to server autostart "sm_models"
Reply With Quote #6

I don't know. I just made it compile, i'm not really sure what you are trying to do.
Lebson506th is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 08-10-2008 , 14:09   Re: Player connecten to server autostart "sm_models"
Reply With Quote #7

Code:
#pragma semicolon 1
#include <sourcemod>

public Plugin:myinfo =
{
    name = "CommandExec",
    author = "WebDestroya",
    description = "Runs a command at each round",
    version = "1.0",
    url = "http://mitchdb.com/"
};

public OnPluginStart()
{
    HookEvent("player_spawn", Event_PlayerSpawn);
}

public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new index = GetClientOfUserId(GetEventInt(event, "userid"));
    
    ClientCommand(index, "sm_models");
}
__________________
Greyscale is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 08-10-2008 , 14:49   Re: Player connecten to server autostart "sm_models"
Reply With Quote #8

That is a much better way of doing it =)
Lebson506th is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 08-10-2008 , 15:13   Re: Player connecten to server autostart "sm_models"
Reply With Quote #9

Quote:
also wenn ich alleine connecte kommt das menu nicht beim joinen

schade,, bin am verzweifeln, aber irgendwie gehts nich
I think he's saying that if you join later it doesn't work, doing it on player_spawn should fix that.
__________________
Greyscale is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 08-10-2008 , 15:49   Re: Player connecten to server autostart "sm_models"
Reply With Quote #10

He said he joined the server by himself and the menu didn't "join" (i think he means it didn't show up)

The 2nd sentence, i don't really get... but its something to do with him being upset.
Lebson506th 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:52.


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