AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Next stupid problem :/ (https://forums.alliedmods.net/showthread.php?t=63375)

Sn!ff3r 11-19-2007 14:45

Next stupid problem :/
 
Why it doesn't work? :/

Code:

#include <amxmodx>
 
new const PLUGINNAME[] = "NiuwPlajerSund"
new const VERSION[] = "0.1"
new const AUTHOR[] = "Sn!ff3r"
 
public plugin_init() {
register_plugin(PLUGINNAME, VERSION, AUTHOR)
}
 
public client_authorized(id){
client_cmd(id, "spk misc/niuwplajer")
}
 
public plugin_precache()
{
precache_sound("misc/niuwplajer.wav")
}


ConnorMcLeod 11-19-2007 15:04

Re: Next stupid problem :/
 
Try the sound, put in on your cstrike folder, launch cs, then type in console :
spk misc/niuwplajer

Sn!ff3r 11-19-2007 15:08

Re: Next stupid problem :/
 
Sound is playing... i added some code:

Code:

#include <amxmodx>
 
new const PLUGINNAME[] = "NiuwPlajerSund"
new const VERSION[] = "0.1"
new const AUTHOR[] = "Sn!ff3r"
 
public plugin_init() {
register_plugin(PLUGINNAME, VERSION, AUTHOR)
}
 
public client_authorized(id){
client_cmd(id, "spk misc/niuwplajer")
client_print(id, print_chat, "Welcome")
}
 
public plugin_precache()
{
precache_sound("misc/niuwplajer.wav")
}

And "welcome" also doesnt work :/

EDIT: Sorry... sound is playing while i'm connecting to server. I want to play sound when i joined team...

M249-M4A1 11-19-2007 16:22

Re: Next stupid problem :/
 
Maybe this?

PHP Code:

#include <amxmodx> 

public plugin_init() { 
    
register_plugin("NiuwPlajerSund" "0.1""Sn!ff3r")
}

public 
plugin_precache() { 
    
precache_sound("misc/niuwplajer.wav")
}

public 
client_putinserver(id) { 
    
set_task(10.0"welcomeUser"id)
}

public 
welcomeUser(id) {
    
client_cmd(id"spk misc/niuwplajer")
    
client_print(idprint_chat"Welcome")



ConnorMcLeod 11-19-2007 17:27

Re: Next stupid problem :/
 
In that case it's better to use motd.txt


All times are GMT -4. The time now is 01:14.

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