Raised This Month: $ Target: $400
 0% 

porting help!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 01-31-2005 , 06:02   porting help!
Reply With Quote #1

i'm trying to port a amx plugin to amxx. what do i change cmd_access and cmd_target to?

and what moudles do they need?


EDIT, pls look below.
n0obie4life is offline
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 01-31-2005 , 06:06  
Reply With Quote #2

look them up..... type in sma amx #include amxmisc and not all functions uses modules
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 01-31-2005 , 06:11  
Reply With Quote #3

thanks.

i have a invalid string and an expected token problem when compiling, help anyone?
n0obie4life is offline
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 01-31-2005 , 06:13  
Reply With Quote #4

try this #include string
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 01-31-2005 , 06:22  
Reply With Quote #5

wootz thanks. you are a cool dude.

now i'm left with one problem (sry man, i'm a amxx NOOB)..

error 001: expected token: ",", but found "-end of file-"

i didn't find a single end of file in the whole script..
n0obie4life is offline
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 01-31-2005 , 06:27  
Reply With Quote #6

hmm not sure about that error does it say anything else? does it compile?
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 01-31-2005 , 06:27  
Reply With Quote #7

nope it doesn't compile...do you want the source? its kinda n00bish..
n0obie4life is offline
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 01-31-2005 , 06:30  
Reply With Quote #8

yes please attach it.... or pm me with the file...
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 01-31-2005 , 06:33  
Reply With Quote #9

okay done.

Code:
/* AMX Mod script. * * (c) Copyright 2003, f117bomb * This file is provided as is (no warranties). */   #include <amxmodx> #include <fun> #include <amxmisc> #include <string> /* * Sets a player on fire with effects. Users can catch others on fire by standing next to them. * Usage: amx_fire <authid, nick or #userid> * */ new gmsgDamage,smoke,mflash new onfire[33] public ignite_effects(skIndex[])   {     new kIndex = skIndex[0]             if (is_user_alive(kIndex) && onfire[kIndex] )    {         new korigin[3]         get_user_origin(kIndex,korigin)                         //TE_SPRITE - additive sprite, plays 1 cycle         message_begin( MSG_BROADCAST,SVC_TEMPENTITY)         write_byte( 17 )         write_coord(korigin[0])  // coord, coord, coord (position)         write_coord(korigin[1])           write_coord(korigin[2])         write_short( mflash ) // short (sprite index)         write_byte( 20 ) // byte (scale in 0.1's)           write_byte( 200 ) // byte (brightness)         message_end()                 //Smoke         message_begin( MSG_BROADCAST,SVC_TEMPENTITY,korigin)         write_byte( 5 )         write_coord(korigin[0])// coord coord coord (position)         write_coord(korigin[1])         write_coord(korigin[2])         write_short( smoke )// short (sprite index)         write_byte( 20 ) // byte (scale in 0.1's)         write_byte( 15 ) // byte (framerate)         message_end()                 set_task(0.2, "ignite_effects" , 0 , skIndex, 2)            }       else    {         if( onfire[kIndex] )   {             emit_sound(kIndex,CHAN_AUTO, "scientist/scream21.wav", 0.6, ATTN_NORM, 0, PITCH_HIGH)             onfire[kIndex] = 0         }     }       return PLUGIN_CONTINUE } public ignite_player(skIndex[])   {     new kIndex = skIndex[0]             if (is_user_alive(kIndex) && onfire[kIndex] )    {         new korigin[3]         new players[32], inum = 0         new pOrigin[3]              new kHeath = get_user_health(kIndex)         get_user_origin(kIndex,korigin)                 //create some damage         set_user_health(kIndex,kHeath - 10)         message_begin(MSG_ONE, gmsgDamage, {0,0,0}, kIndex)         write_byte(30) // dmg_save         write_byte(30) // dmg_take         write_long(1<<21) // visibleDamageBits         write_coord(korigin[0]) // damageOrigin.x         write_coord(korigin[1]) // damageOrigin.y         write_coord(korigin[2]) // damageOrigin.z         message_end()                         //create some sound         emit_sound(kIndex,CHAN_ITEM, "ambience/flameburst1.wav", 0.6, ATTN_NORM, 0, PITCH_NORM)                         //Ignite Others                     get_players(players,inum,"a")         for(new i = 0 ;i < inum; ++i)   {                                               get_user_origin(players[i],pOrigin)                         if( get_distance(korigin,pOrigin) < 100  )   {                 if( !onfire[players[i]] )   {                     new spIndex[2]                     spIndex[0] = players[i]                     new pName[32], kName[32]                                        get_user_name(players[i],pName,31)                     get_user_name(kIndex,kName,31)                     emit_sound(players[i],CHAN_WEAPON ,"scientist/scream07.wav", 1.0, ATTN_NORM, 0, PITCH_HIGH)                     client_print(0,3,"* [ATAC] Run! %s has been put on fire!",kName,pName)                     onfire[players[i]] =1                     ignite_player(players[i])                     ignite_effects(players[i])                  }                               }         }                   players[0] = 0         pOrigin[0] = 0                          korigin[0] = 0                      //Call Again in 2 seconds               set_task(2.0, "ignite_player" , 0 , skIndex, 2)         }               return PLUGIN_CONTINUE } public fire_player(id,level,cid) {     if (!cmd_access(id,level,cid,2))         return PLUGIN_HANDLED         new arg[32]     read_argv(1,arg,31)         new victim = cmd_target(id,arg,7)     if (!victim)         return PLUGIN_HANDLED     new skIndex[2]     skIndex[0] = victim     new name[32]     get_user_name(victim,name,31)         onfire[victim] = 1     ignite_effects(skIndex)     ignite_player(skIndex)             new adminname[32]           get_user_name(id,adminname,31)       switch(get_cvar_num("amx_show_activity"))   {              case 2:   client_print(0,print_chat,"ADMIN %s: set %s on fire.",adminname,name)              case 1:   client_print(0,print_chat,"ADMIN: set %s on fi0"

yaeh, i know its cheap...don't flame pls..i'm a noob in this..i just wanted to play around.


EDIT: used small tags, but pls d/l the sma, this one seems to have a cut..some parts are missing..
n0obie4life is offline
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 01-31-2005 , 07:20  
Reply With Quote #10

sorry I keep getting error!!! I know it has something to do with log_amx but can't fix it...
btw this is the real sma.....
Code:
* AMX Mod script. * * (c) Copyright 2003, f117bomb * This file is provided as is (no warranties). */   #include <amxmodx> #include <fun> #include <amxmisc> /* * Sets a player on fire with effects. Users can catch others on fire by standing next to them. * Usage: amx_fire <authid, nick or #userid> * */ new gmsgDamage,smoke,mflash new onfire[33] public ignite_effects(skIndex[])   {     new kIndex = skIndex[0]               if (is_user_alive(kIndex) && onfire[kIndex] )    {         new korigin[3]         get_user_origin(kIndex,korigin)                           //TE_SPRITE - additive sprite, plays 1 cycle         message_begin( MSG_BROADCAST,SVC_TEMPENTITY)         write_byte( 17 )         write_coord(korigin[0])  // coord, coord, coord (position)         write_coord(korigin[1])           write_coord(korigin[2])         write_short( mflash ) // short (sprite index)         write_byte( 20 ) // byte (scale in 0.1's)           write_byte( 200 ) // byte (brightness)         message_end()                   //Smoke         message_begin( MSG_BROADCAST,SVC_TEMPENTITY,korigin)         write_byte( 5 )         write_coord(korigin[0])// coord coord coord (position)         write_coord(korigin[1])         write_coord(korigin[2])         write_short( smoke )// short (sprite index)         write_byte( 20 ) // byte (scale in 0.1's)         write_byte( 15 ) // byte (framerate)         message_end()                   set_task(0.2, "ignite_effects" , 0 , skIndex, 2)             }         else    {         if( onfire[kIndex] )   {             emit_sound(kIndex,CHAN_AUTO, "scientist/scream21.wav", 0.6, ATTN_NORM, 0, PITCH_HIGH)             onfire[kIndex] = 0         }     }         return PLUGIN_CONTINUE } public ignite_player(skIndex[])   {     new kIndex = skIndex[0]               if (is_user_alive(kIndex) && onfire[kIndex] )    {         new korigin[3]         new players[32], inum = 0         new pOrigin[3]                 new kHeath = get_user_health(kIndex)         get_user_origin(kIndex,korigin)                   //create some damage         set_user_health(kIndex,kHeath - 10)         message_begin(MSG_ONE, gmsgDamage, {0,0,0}, kIndex)         write_byte(30) // dmg_save         write_byte(30) // dmg_take         write_long(1<<21) // visibleDamageBits         write_coord(korigin[0]) // damageOrigin.x         write_coord(korigin[1]) // damageOrigin.y         write_coord(korigin[2]) // damageOrigin.z         message_end()                           //create some sound         emit_sound(kIndex,CHAN_ITEM, "ambience/flameburst1.wav", 0.6, ATTN_NORM, 0, PITCH_NORM)                           //Ignite Others                         get_players(players,inum,"a")         for(new i = 0 ;i < inum; ++i)   {                                                 get_user_origin(players[i],pOrigin)                             if( get_distance(korigin,pOrigin) < 100  )   {                 if( !onfire[players[i]] )   {                     new spIndex[2]                     spIndex[0] = players[i]                     new pName[32], kName[32]                                         get_user_name(players[i],pName,31)                     get_user_name(kIndex,kName,31)                     emit_sound(players[i],CHAN_WEAPON ,"scientist/scream07.wav", 1.0, ATTN_NORM, 0, PITCH_HIGH)                     client_print(0,3,"* [ATAC] OH! NO! %s has caught %s on fire!",kName,pName)                     onfire[players[i]] =1                     ignite_player(players[i])                     ignite_effects(players[i])                     }                                 }         }                     players[0] = 0         pOrigin[0] = 0                             korigin[0] = 0                           //Call Again in 2 seconds                 set_task(2.0, "ignite_player" , 0 , skIndex, 2)             }                   return PLUGIN_CONTINUE } public fire_player(id,level,cid) {     if (!cmd_access(id,level,cid,2))         return PLUGIN_HANDLED           new arg[32]     read_argv(1,arg,31)           new victim = cmd_target(id,arg,7)     if (!victim)         return PLUGIN_HANDLED     new skIndex[2]     skIndex[0] = victim         new name[32]     get_user_name(victim,name,31)           onfire[victim] = 1     ignite_effects(skIndex)     ignite_player(skIndex)               new adminname[32]           get_user_name(id,adminname,31)       switch(get_cvar_num("amx_show_activity"))   {              case 2:   client_print(0,print_chat,"ADMIN %s: set %s on fire.",adminname,name)              case 1:   client_print(0,print_chat,"ADMIN: set %s on fire.",name)     }               console_print(id,"Client ^"%s^" has been set on fire...",name) }   public plugin_precache()   {       mflash = precache_model("sprites/muzzleflash.spr")     smoke = precache_model("sprites/steam1.spr")     precache_sound("ambience/flameburst1.wav")     precache_sound("scientist/scream21.wav")     precache_sound("scientist/scream07.wav")           return PLUGIN_CONTINUE } public plugin_init() {      register_plugin("Admin Fire","1.0.0","f117bomb")      register_concmd("amx_fire","fire_player",ADMIN_SLAY,"<authid, nick or #userid>")      gmsgDamage = get_user_msgid("Damage")        return PLUGIN_CONTINUE   }
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
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:19.


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