Raised This Month: $ Target: $400
 0% 

[HELP] I need help en my plugin :)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
reyi
Member
Join Date: Aug 2006
Old 12-13-2006 , 21:21   [HELP] I need help en my plugin :)
Reply With Quote #1

i need aid with my plugin I want to put nukem but I have in the SLAY2 and in NUKEM the same function and does not let to me compile (line 2002 “explode”) anybody knows like using an alternative function? from already thank you very much
Attached Files
File Type: sma Get Plugin or Get Source (admincmd.sma - 121 views - 61.6 KB)
reyi is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-14-2006 , 04:46   Re: [HELP] I need help en my plugin :)
Reply With Quote #2

Show us the error message...
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
mateo10
Veteran Member
Join Date: Jan 2006
Old 12-14-2006 , 05:09   Re: [HELP] I need help en my plugin :)
Reply With Quote #3

I didn't really understand what you wanted but here is it, compiles fine.
Attached Files
File Type: sma Get Plugin or Get Source (admincmd1.sma - 519 views - 60.3 KB)
mateo10 is offline
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
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-14-2006 , 14:57   Re: [HELP] I need help en my plugin :)
Reply With Quote #5

Sorry i didn't see this before, but

Code:
explode(vec1[3]) {
has to be:

Code:
public explode(vec1[3]) {
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
reyi
Member
Join Date: Aug 2006
Old 12-14-2006 , 15:51   Re: [HELP] I need help en my plugin :)
Reply With Quote #6

I agrege as I were

Quote:
// NUKE
public 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()
//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) 188
write_byte( 10 ) // byte (framerate)
message_end()

//TE_Explosion
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 3 )
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
write_short( fire )
write_byte( 188 ) // byte (scale in 0.1's) 188
write_byte( 10 ) // byte (framerate)
write_byte( 0 ) // byte flags
message_end()
}
explodeall(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( fire2 )
write_byte( 0 ) // startframe
write_byte( 0 ) // framerate
write_byte( 24 ) // life 2
write_byte( 128 ) // width 16
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()

//TE_Explosion
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 3 )
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
write_short( fire1 )
write_byte( 188 ) // byte (scale in 0.1's) 188
write_byte( 10 ) // byte (framerate)
write_byte( 0 ) // byte flags
message_end()
}
public roundend_cleanup(){
if(bIsNuking == true){
blowem_up()
}
}
public admin_nukem(id,level,cid){
if (!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED
if(bIsNuking == true){
client_print(id,print_console,"[AMX] The nuke is already in progress")
return PLUGIN_HANDLED
}
new cmd[32]
read_argv(0,cmd,32)
if(equal (cmd[10], "j",1))
lethal = false
else
lethal = true
new name[32]
get_user_name(id,name,32)
client_cmd(0,"spk ^"vox/alert _comma _comma atomic weapon detected^"")
client_print(0,print_chat,"[AMX] : %s has launched the NUKE, were all gonna die!!!", name)
immune = id
new authid[16]
get_user_authid(id,authid,16)
log_amx("NUKEM - %s<%d><%s><> - NUKEM", name,get_user_userid(id),authid)

bIsNuking = true
nuke_tmr = BOMB_FUSE
return PLUGIN_HANDLED
}
public nuke_timer(){
if(bIsNuking == false){
return PLUGIN_HANDLED
}
new maxpl = get_maxplayers()+1
new players[32], inum
nuke_tmr -=1
if (nuke_tmr > 0){
if( (nuke_tmr > 5) && (nuke_tmr < 11) ){
set_hudmessage(200,0,0, 0.03, 0.76, 2, 0.02, 1.0, 0.01, 0.1, 2)
show_hudmessage(0,"The world will explode in %d seconds.",nuke_tmr - 5)
}
if(nuke_tmr == 12){
client_cmd(0, "spk ^"ambience/jetflyby1^"")
}
if(nuke_tmr == 11){
client_cmd(0,"spk ^"fvox/range^"")
}
if( (nuke_tmr < 11) && (nuke_tmr > 5) ){
new temp[48]
num_to_word(nuke_tmr-5,temp,4
client_cmd(0,"spk ^"fvox/%s^"",temp)
}
if( nuke_tmr == 5){
client_cmd(0, "spk ^"ambience/the_horror1^"")
get_players(players,inum,"ac")
for(new i = 0 ;i < inum; ++i){
message_begin(MSG_ONE,gmsgFade,{0,0,0},player s[i]) // use the magic #1 for "one client"
write_short( 1<<11 ) // fade lasts this long furation
write_short( 1<<11 ) // fade lasts this long hold time
write_short( 1<<12 ) // fade type (in / out)
write_byte( 250 ) // fade red
write_byte( 250 ) // fade green
write_byte( 250 ) // fade blue
write_byte( 255 ) // fade alpha
message_end()
}
new origin[3]
explodeall(origin)
}
if(nuke_tmr < 5){
get_players(players,inum,"ac")
client_cmd(0, "spk ^"ambience/the_horror%d^"",nuke_tmr)
if(inum < 1){
blowem_up()
return PLUGIN_HANDLED
}else{
new origin[3]
if(nuke_tmr == 4){
get_players(players,inum,"c")
for(new i = 0 ;i < inum; ++i){
message_begin(MSG_ONE,gmsgShake,{0,0,0},playe rs[i])
write_short( 1<<14 )// shake amount
write_short( 1<<14 )// shake lasts this long
write_short( 1<<14 )// shake noise frequency
message_end()
}
explodeall(origin)
}else{
new rorigin[3],sb
for(new i = 1 ;i < 50; ++i){
rorigin[0] = random(3000)
rorigin[1] = random(3000)
rorigin[2] = random(2000)
sb = random(2)
if(sb == 0)
rorigin[0] = rorigin[0] * -1
sb = random(2)
if(sb == 0)
rorigin[1] = rorigin[1] * -1
sb = random(2)
if(sb == 0)
rorigin[2] = rorigin[2] * -1
explodeall(rorigin)
}
}
for(new i = 1 ;i < maxpl; ++i){
new rndkill = random(9)
if(rndkill == 0){
if(lethal == true){
if(i != immune){
user_kill(i,1)
}
}
get_user_origin(i,origin)
origin[2] = origin[2] - 26
explode(origin)
}
}
}
}
if(nuke_tmr == 2){
get_players(players,inum,"c")
for(new i = 0 ;i < inum; ++i){
message_begin(MSG_ONE,gmsgShake,{0,0,0},playe rs[i])
write_short( 1<<14 )// shake amount
write_short( 1<<14 )// shake lasts this long
write_short( 1<<14 )// shake noise frequency
message_end()
}
}
}else{
blowem_up()
}
return PLUGIN_CONTINUE
}
public blowem_up(){
bIsNuking = false
nuke_tmr = 0
set_hudmessage(255,50,50, -1.0, 0.50, 2, 0.02, 4.0, 0.01, 0.1, 2)
if(lethal == true)
show_hudmessage(0,"The world has exploded.")
else
show_hudmessage(0,"HAHAHAHA -- Just kidding. That wasnt a real NUKE.")
new origin[3]
new maxpl = get_maxplayers() +1
for(new a=1; a<=maxpl; a++){
if(is_user_connected(a) == 1){
get_user_origin(a,origin)
origin[2] = origin[2] - 26
explode(origin)
if(lethal == true){
if(a != immune){
user_kill(a,1)
}
}
}
}
return PLUGIN_HANDLED
}
send_own_score(id) {
new mode[8]
get_cvar_string("amx_ownscore_mode",mode,
new rules = read_flags(mode)
if (rules & 1) return /* do no changes */
message_begin(MSG_ALL, gmsgScoreInfo)
write_byte(id)
write_short( (rules&2) ? tscore[tteamid[id]] : tfrags[id] )
write_short( (rules&4) ? 0 : tdeaths[id] )
write_short( tclass[id] )
write_short( tteamid[id] )
message_end()
}
public scoreinfo_event() {
new id = read_data(1) /* about who is this score */
tfrags[id] = read_data(2)
tdeaths[id] = read_data(3)
tclass[id] = read_data(4) /* in CS there is no classes - this is always 0 */
tteamid[id] = read_data(5)
send_own_score(id)
}



but it even throws he himself error to me. my plugin has slay2 and nukem (also others) but the one that he himself symbol has (explode) is those two. If or if I must have plugins separated?
reyi is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-14-2006 , 16:05   Re: [HELP] I need help en my plugin :)
Reply With Quote #7

You mean you took two plugins with both 'public explosion(' in them ?
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
reyi
Member
Join Date: Aug 2006
Old 12-14-2006 , 23:12   Re: [HELP] I need help en my plugin :)
Reply With Quote #8

I remove them from this Web and believe that the 2 estan named as “explode” already were named thus
reyi is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 12-15-2006 , 11:09   Re: [HELP] I need help en my plugin :)
Reply With Quote #9

Quote:
Originally Posted by dutchmeat View Post
Sorry i didn't see this before, but

Code:
explode(vec1[3]) {
has to be:

Code:
public explode(vec1[3]) {
Not true.
[ --<-@ ] Black Rose is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-15-2006 , 11:33   Re: [HELP] I need help en my plugin :)
Reply With Quote #10

Quote:
Originally Posted by [ --<-@ ] Black Rose View Post
Not true.
It is true, since it's a function it has to be initialized as a function.
If you got an answer, explain
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat 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 19:07.


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