Kod: Tümünü seç
Sonuç
Eklenti derleme sonucu aşağıdaki gibidir;
AMX Mod X Compiler 1.8.3-dev+5079
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team
/home/araclar/compiler/include/colorchat.inc(31) : error 021: symbol already defined: "client_print_color"
/home/araclar/compiler/include/colorchat.inc(34) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(36) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(39) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(45) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(49) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(56) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(58) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(62) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(67) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(70) : error 021: symbol already defined: "get_user_team"
/home/araclar/compiler/include/colorchat.inc(74) : error 021: symbol already defined: "id"
/home/araclar/compiler/include/colorchat.inc(74) : warning 218: old style prototypes used with optional semicolumns
/home/araclar/compiler/include/colorchat.inc(77) : error 021: symbol already defined: "id"
/home/araclar/compiler/include/colorchat.inc(77) : warning 218: old style prototypes used with optional semicolumns
/home/araclar/compiler/include/colorchat.inc(80) : error 021: symbol already defined: "id"
/home/araclar/compiler/include/colorchat.inc(80) : warning 218: old style prototypes used with optional semicolumns
/home/araclar/compiler/include/colorchat.inc(81) : error 054: unmatched closing brace
/home/araclar/compiler/include/colorchat.inc(82) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(84) : warning 218: old style prototypes used with optional semicolumns
/home/araclar/compiler/include/colorchat.inc(85) : error 054: unmatched closing brace
/home/araclar/compiler/include/colorchat.inc(89) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(95) : error 021: symbol already defined: "get_players"
/home/araclar/compiler/include/colorchat.inc(96) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(98) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(105) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(107) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(110) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(114) : error 010: invalid function or declaration
/home/araclar/compiler/include/colorchat.inc(115) : error 010: invalid function or declaration
Compilation aborted.
26 Errors.
Done.
Plugin burada:
Kod: Tümünü seç
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <zombieplague>
#include <colorchat>
#define PLUGIN "asd"
#define VERSION "1.3"
#define AUTHOR "asd"
#define GAMBLINGTIME 15.0
new Gamble[ 33 ]
new Guess[ 33 ];
new bool: b_gambling;
new cvar1, cvar2;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /kumar","Menu");
register_clcmd("say !kumar","Menu");
register_clcmd("say .kumar","Menu");
register_clcmd("say kumar","Menu");
register_message(get_user_msgid("TextMsg") ,"TextMsg")
register_logevent("event_new_round",2,"0=World triggered","1=Round_Start")
cvar1 = register_cvar( "kumar_ammo", "5" );
cvar2 = register_cvar( "kumar_katlama", "2" );
}
public plugin_end()
{
remove_task( 987654 );
}
public event_new_round(id)
{
b_gambling = true;
set_task( GAMBLINGTIME, "StopGambling", 987654 );
ColorChat( 0, GREEN, "[mort vivante]^4 ^3Kumar Oyunu ^1acildi,Kumar Oynamak icin '^3!kumar^1' yaziniz..^3 15 ^1Saniye sonra bahisler kapatilacak!" );
if( b_gambling == true ) {
set_task(5.0,"bilgiv1",id,_,_,_,2)
}
}
public bilgiv1(id)
{
ColorChat(id,GREEN,"[mort vivante]^4 ^3Kumar Oyunu ^1acildi,Kumar Oynamak icin '^3!kumar^1' yaziniz..^3 15 ^1Saniye sonra bahisler kapatilacak!");
}
public StopGambling( taskid )
{
b_gambling = false;
ColorChat( 0, GREEN, "[mort vivante]^4 ^3Kumar Oyunu ^1Kapatildi!" );
}
public client_connect( id )
{
Guess[ id ] = 0;
Gamble[ id ] = get_pcvar_num( cvar1 );
}
public client_disconnect( id )
{
Guess[ id ] = 0;
Gamble[ id ] = 0;
}
public Menu( id )
{
if( !b_gambling ) {
ColorChat( id, GREEN, "[mort vivante] ^1Simdi Kumar Oynayamazsin!" );
return PLUGIN_CONTINUE;
}
if( Guess[ id ] ){
ColorChat( id, GREEN, "[mort vivante] ^1Zaten Kumar Oynamissin!" );
return PLUGIN_CONTINUE;
}
new szMenu[ 128 ];
new menu = menu_create( "\rmort vivante \w| \yKumar Oynama", "Menu_handle" );
menu_additem( menu, "\wKumar Arttir \y[+]", "1" );
menu_additem( menu, "\wKumar Dusur \r[-]", "2" );
menu_additem( menu, "\wBu Eli \rZombieler \wAlir", "3" );
format( szMenu, charsmax( szMenu ), "\wBu Eli \yInsanlar \wAlir^n\ySuanki Bahisiniz : \r%d \yCephane", Gamble[ id ] );
menu_additem( menu , szMenu, "4" );
menu_display( id, menu );
return PLUGIN_HANDLED;
}
public Menu_handle( id, menu, item ){
if( item == MENU_EXIT ) {
menu_destroy( menu )
return PLUGIN_HANDLED;
}
new data[6], iName[64]
new acces, callback;
menu_item_getinfo( menu, item, acces, data,5, iName, 63, callback )
new items = str_to_num(data)
switch( items )
{
case 1 :{
if( zp_get_user_ammo_packs( id ) < Gamble[id] + get_pcvar_num( cvar1 ) || zp_get_user_ammo_packs( id ) == 0) {
ColorChat(id,GREEN,"[mort vivante] ^1Yeterli Cephaneniz Yok!");
}
else {
Gamble[id] += get_pcvar_num( cvar1 );
}
Menu( id );
}
case 2 :{
if( Gamble[ id ] <= 0)
{
ColorChat(id,GREEN,"[mort vivante] ^1Kumarinizi Hic Arttirmamissiniz!");
Gamble[ id ] = 1;
}
else if( Gamble[ id ] < get_pcvar_num( cvar1 ) || zp_get_user_ammo_packs( id ) == 0) {
ColorChat(id,GREEN,"[mort vivante] ^1Daha Fazla Azaltamazsiniz!");
}
else {
Gamble[ id ] -= get_pcvar_num( cvar1 );
if( Gamble[ id ] <= 0 )
Gamble[ id ] = 1;
}
Menu( id );
}
case 3 :{
if( Guess[ id ] ) {
ColorChat(id,GREEN,"[mort vivante] ^1Zaten Oynamissin!");
}
else {
Guess[ id ] = 1;
zp_set_user_ammo_packs( id, zp_get_user_ammo_packs( id ) - Gamble[ id ] );
ColorChat(id,GREEN,"[mort vivante] ^1Zombiler Uzerine^3 %d^1 Cephane Oynadin!", Gamble[ id ] );
}
}
case 4 :{
if( Guess[ id ] ) {
ColorChat(id,GREEN,"[mort vivante] ^1Zaten Oynamissin!");
}
else {
Guess[ id ] = 2;
zp_set_user_ammo_packs( id, zp_get_user_ammo_packs( id ) - Gamble[ id ] );
ColorChat(id,GREEN,"[mort vivante] ^1Insanlar Uzerine^3 %d^1 Cephane Oynadin!", Gamble[ id ] );
}
}
}
return PLUGIN_CONTINUE;
}
public TextMsg()
{
new players[ 32 ], pnum, id;
get_players( players, pnum );
new Msg[ 32 ];
get_msg_arg_string( 2, Msg, charsmax( Msg) )
if( equal( Msg, "#Terrorists_Win") ) {
for( new i = 0; i < pnum; i++ ) {
id = players[ i ];
if( Guess[ id ] ) {
if( Guess[ id ] == 1 ) {
ColorChat(id,GREEN,"[mort vivante] ^1Kazandin! Kumara Bastigin Cephane^3 2^1'ye Katlandi");
zp_set_user_ammo_packs(id,zp_get_user_ammo_packs(id) + Gamble[ id ] * get_pcvar_num( cvar2 ) );
}
else {
ColorChat(id,GREEN,"[mort vivante] ^1Kumari Kaybettin!");
}
Guess[ id ] = 0;
Gamble[ id ] = get_pcvar_num( cvar1 );
}
}
}
else if( equal( Msg, "#CTs_Win" ) ) {
for( new i = 0; i < pnum; i++ ) {
id = players[ i ];
if( Guess[ id ] ) {
if( Guess[ id ] == 2 ) {
ColorChat(id,GREEN,"[mort vivante] ^1Kazandin! Kumara Bastigin Cephane^3 2^1'ye Katlandi");
zp_set_user_ammo_packs(id,zp_get_user_ammo_packs(id) + Gamble[ id ] * get_pcvar_num( cvar2 ) );
}
else {
ColorChat(id,GREEN,"[mort vivante] ^1Kumari Kaybettin!");
}
Guess[ id ] = 0;
Gamble[ id ] = get_pcvar_num( cvar1 );
}
}
}
else if( equal( Msg, "#Round_Draw" ) ) {
for( new i = 0; i < pnum; i++ ) {
id = players[ i ];
if( Guess[ id ] ) {
ColorChat(id,GREEN,"[mort vivante] ^1Berabere! Kumara Bastigin Cephaneyi Geri Aldin");
zp_set_user_ammo_packs(id,zp_get_user_ammo_packs(id) + Gamble[ id ] );
}
Guess[ id ] = 0;
Gamble[ id ] = get_pcvar_num( cvar1 );
}
}
if( task_exists( 987654 ) )
remove_task( 987654 );
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/