Raised This Month: $ Target: $400
 0% 

Cant complie


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
siska
New Member
Join Date: Nov 2010
Old 11-08-2010 , 06:46   Cant complie
Reply With Quote #1

Hi! I'm mading a code typesound, but it doesn't compliing

Code:
///////////////////////////////////////////////
//AMX[X]MOD: //
// Type Sounds v1.5 //
// By: Dizzy //
// //
//SHORT DESCRIPTION: //
// Client command-based plugin that //
//returns sounds to key words (listed below) //
// //
// //
//CVARS: //
// amx_typesounds 1 //
// -Plugin switch //
// amx_typesounds_ao 0 //
// -Admins only //
// amx_typesounds_uses 0 //
// -Uses per round //
// amx_typesounds_inform 1 //
// -Tell the user plugin is on //
// //
//CLCMDS: //
// sounds //
// -This displays MOTD help //
// //
// nyertunk //
// fasz //
// hahaha //
// lol //
// kuss //
// anyad //
// hs //
// borulj //
// kabbe //
// csiter //
// eridj //
// //
//THANKS: //
// Thanks goes out to wrecked_ and Bugsy //
//for helping initially with the strings args//
//fyriks for the Trie setup and hleV for the //
//file access code. //
// //
//This plugin wouldn't have the functionality//
//that it does without them! //
///////////////////////////////////////////////

#include <amxmodx>
#include <amxmisc>

#define PLUGINNAME "Type Sounds"
#define VERSION "1.5"
#define AUTHOR "Dizzy"

#define CVAR_PLUGIN "amx_typesounds"
#define CVAR_USES "amx_typesounds_uses"
#define CVAR_ADMIN "amx_typesounds_ao"
#define CVAR_INFORM "amx_typesounds_inform"
#define CVAR_UNLIMITED "amx_typesounds_unlimited"

new g_uses[33] = "CVAR_USES";

new Trie:g_tWords
new const g_szWords[][] =
{
"nyertunk",
"fasz",
"hahaha",
"lol",
"kuss",
"anyad",
"hs",
"borulj",
"kabbe",
"csiter",
"eridj"
}

public plugin_init()
{
register_plugin(PLUGINNAME, VERSION, AUTHOR);

register_cvar(CVAR_PLUGIN, "1");
register_cvar(CVAR_USES, "5");
register_cvar(CVAR_ADMIN, "0");
register_cvar(CVAR_INFORM, "1");
register_cvar(CVAR_UNLIMITED, "0");

register_clcmd("say","play");
register_clcmd("say sounds","display");

register_clcmd("say_team","play");
register_clcmd("say_team sounds","display");

register_event("ResetHUD","roundchange","b");

g_tWords = TrieCreate()
for(new i = 0; i < sizeof(g_szWords); i++)
{
TrieSetCell(g_tWords, g_szWords[i], i)
}
}

public client_putinserver(id)
{
if (is_user_bot(id) || !get_cvar_num(CVAR_PLUGIN) || !get_cvar_num(CVAR_INFORM))
return PLUGIN_HANDLED;

set_task(25.0, "inform", id);

return PLUGIN_HANDLED;
}

public inform(id){

new gMsgSayText;

gMsgSayText = get_user_msgid("SayText");
new printMsg[191];

client_print(id, print_chat, "[Type Sounds]: This server is running Type Sounds v%s -- By: %s", VERSION, AUTHOR);
format(printMsg,191, "^x01[Type Sounds]: Type ^x03sounds ^x01to view available sounds!",id);

message_begin(MSG_ONE,gMsgSayText,{0,0,0},id) ;
write_byte(id);
write_string(printMsg);
message_end();

return PLUGIN_HANDLED;
}

public plugin_precache()
{
new szSoundFile[64]
for( new i = 0; i < sizeof(g_szWords); i++)
{
formatex(szSoundFile, charsmax(szSoundFile), "misc/%s.wav", g_szWords[i])
precache_sound(szSoundFile)
}
}

public play(id)
{
new szArg[16]
read_args(szArg, charsmax(szArg))
remove_quotes(szArg)

if (!get_cvar_num(CVAR_PLUGIN) || (get_cvar_num(CVAR_ADMIN) && !is_user_admin(id)))
return PLUGIN_CONTINUE;

if (TrieKeyExists(g_tWords, szArg))
{
if (get_cvar_num(CVAR_UNLIMITED))
client_cmd(0, "spk misc/%s", szArg)

else if (!get_cvar_num(CVAR_UNLIMITED) && g_uses[id] != 0)
{
client_cmd(0, "spk misc/%s", szArg)
g_uses[id]--;
client_print(id, print_chat, "[Type Sounds]: You said '%s', %d sound(s) left!", szArg, g_uses[id])

return PLUGIN_CONTINUE;
}

return PLUGIN_CONTINUE;
}

return PLUGIN_CONTINUE;
}

public display(id)
{
new buffer[1024]
new len = copy(buffer, 1023, "<body bgcolor=^"#000000^" text=^"#FFB000^"><font size=^"2^" face=^"Verdana^">")
len += copy(buffer[len], 1023-len, "<u>Available Sounds</u><br>")
for (new i = 0; i < sizeof(g_szWords); i++)
{
len += copy(buffer[len], 1023-len, "<br>&nbsp;&nbsp;&nbsp;")
len += copy(buffer[len], 1023-len, g_szWords[i])
}
len += copy(buffer[len], 1023-len, "</font></body>")
show_motd(id, buffer, "Type Sounds - By: Dizzy");

return PLUGIN_CONTINUE;
}

public roundchange(id)
{
if (!get_cvar_num(CVAR_PLUGIN) || (get_cvar_num(CVAR_ADMIN) && !is_user_admin(id)))
return PLUGIN_CONTINUE;

g_uses[id] = get_cvar_num(CVAR_USES);

return PLUGIN_HANDLED;
}

public plugin_end()
TrieDestroy(g_tWords)



[IMG]file:///C:/DOCUME%7E1/Dominik/LOCALS%7E1/Temp/moz-screenshot.png[/IMG]whats the problem??
siska is offline
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 11-08-2010 , 08:39   Re: Cant complie
Reply With Quote #2

Hi Dominik. You placed this in the wrong section.
Thank you.
__________________
Jelle (1): I LOVE YOU
Jelle (1): Yeah. omg you are so awesome!
--------------
Jelle (1): You know when a poo is about to exit but it is too big?
Jelle (1): God my ass still hurts
Exploited 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 11:47.


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