Raised This Month: $ Target: $400
 0% 

[HELP] I need help en my plugin :)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
reyi
Member
Join Date: Aug 2006
Old 12-14-2006 , 13:04   Re: [HELP] I need help en my plugin :)
Reply With Quote #4

The error when compiling is :
Quote:
admincmd.sma(2002) : error 021: symbol already defined: "explode"

In sma this repeated 2 times thus:

Quote:
slay_player(id,victim,type) {
new origin[3], srco[3], name[32], name2[32]
get_user_name(victim,name,31)
get_user_name(id,name2,31)
get_user_origin(victim,origin)
origin[2] -= 26
srco[0]=origin[0]+150
srco[1]=origin[1]+150
srco[2]=origin[2]+400
switch(type){
case 1:{
lightning(srco,origin)
emit_sound(victim,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
case 2:{
blood(origin)
emit_sound(victim,CHAN_ITEM, "weapons/headshot2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
case 3: explode(origin)
}
user_kill(victim,1)

get_user_name(victim,name,31)
new adminname[32]
get_user_name(id,adminname,31)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "ADMIN_SLAY2_PLAYER_CASE2", adminname, name)
case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "ADMIN_SLAY2_PLAYER_CASE1", name)
}
console_print(id, "%L", LANG_PLAYER, "ADMIN_SLAY2_PLAYER_SUCCESS", name)
log_amx("%L", LANG_SERVER, "ADMIN_LOG_SLAY2_PLAYER", name2, name)
}

public admin_slay(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new arg[32], arg2[3], type
read_argv(1,arg,31)
read_argv(2,arg2,2)
type = str_to_num(arg2)
if (arg[0]=='@'){
new players[32], inum , name[32]
get_players(players,inum,"ae",arg[1])
if (inum==0){
console_print(id, "%L", LANG_PLAYER, "ADMIN_NO_CLIENTS")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;++a){
if (get_user_flags(players[a])&ADMIN_IMMUNITY){
get_user_name(players[a],name,31)
console_print(id, "%L", LANG_PLAYER, "ADMIN_IMMUNE",name)
continue
}
slay_player(id,players[a],type)
}
}
else {
new player = cmd_target(id,arg,5)
if (!player) return PLUGIN_HANDLED
slay_player(id,player,type)
}
return PLUGIN_HANDLED
}
explode(vec1[3]) {
// blast circles
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 21 )
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2] + 16)
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2] + 1936)
write_short( s2white )
write_byte( 0 ) // startframe
write_byte( 0 ) // framerate
write_byte( 2 ) // life
write_byte( 16 ) // width
write_byte( 0 ) // noise
write_byte( 188 ) // r
write_byte( 220 ) // g
write_byte( 255 ) // b
write_byte( 255 ) //brightness
write_byte( 0 ) // speed
message_end()
//Explosion2
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( 12 )
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
write_byte( 188 ) // byte (scale in 0.1's)
write_byte( 10 ) // byte (framerate)
message_end()
//s2smoke
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 5 )
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
write_short( s2smoke )
write_byte( 2 )
write_byte( 10 )
message_end()
}
blood(vec1[3]) {
//LAVASPLASH
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( 10 )
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
message_end()
}
lightning(vec1[3],vec2[3]) {
//Lightning
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( 0 )
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
write_coord(vec2[0])
write_coord(vec2[1])
write_coord(vec2[2])
write_short( light )
write_byte( 1 ) // framestart
write_byte( 5 ) // framerate
write_byte( 2 ) // life
write_byte( 20 ) // width
write_byte( 30 ) // noise
write_byte( 200 ) // r, g, b
write_byte( 200 ) // r, g, b
write_byte( 200 ) // r, g, b
write_byte( 200 ) // brightness
write_byte( 200 ) // speed
message_end()
//Sparks
message_begin( MSG_PVS, SVC_TEMPENTITY,vec2)
write_byte( 9 )
write_coord( vec2[0] )
write_coord( vec2[1] )
write_coord( vec2[2] )
message_end()
//s2smoke
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec2)
write_byte( 5 )
write_coord(vec2[0])
write_coord(vec2[1])
write_coord(vec2[2])
write_short( s2smoke )
write_byte( 10 )
write_byte( 10 )
message_end()
}

Line 2002:

Quote:
explode(vec1[3]){
// blast circles
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 21 )
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2] + 16)
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2] + 1936)
write_short( white )
write_byte( 0 ) // startframe
write_byte( 0 ) // framerate
write_byte( 2 ) // life 2
write_byte( 128 ) // width 16
write_byte( 0 ) // noise
write_byte( 255 ) // r
write_byte( 255 ) // g
write_byte( 255 ) // b
write_byte( 255 ) //brightness
write_byte( 0 ) // speed
message_end()

in the other plugin walked me bad when “NUKEM” made false killed all: S

help plz
reyi is offline
 



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 06:53.


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