Raised This Month: $51 Target: $400
 12% 

nebie in need of a tut or something


Post New Thread Reply   
 
Thread Tools Display Modes
svendude
Member
Join Date: Aug 2004
Old 08-31-2004 , 20:25  
Reply With Quote #21

I looked at your plug in, and i made my own. i did the god mode and ungod mode thingy, plus i made it so u can go faster, but when i compiled i get like 26 warnings, and it doesn't compile =(

heres wat i got:
Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <amxmod> public plugin_init(){     register_plugin("godspeed 007","1.0","carl")     register_concmd("amx_godmode","cmdgod",ADMIN_LEVEL_A,"<name or #userid>")     register_concmd("amx_fast","cmdfast",ADMIN_LEVEL_A,"<name or #userid>")     register_concmd("amx_fast","cmdunfast",ADMIN_LEVEL_A,"<name or #userid>")     register_concmd("amx_ungod","cmdungod",ADMIN_LEVEL_A,"<name or #userid>") } public cmdgod(id, level, cid) {     if (!cmd_access(id,level,cid2))     return PLUGIN_HANDLED     new arg[32]     read_argv(1,arg,31)     new player = cmd_target(id,arg,8)     if (!player) return PLUGIN_HANDLED     new authid[32],authid2[32],name2[32],name[32]     get_user_authid(id,authid,31)     get_user_authid(player,authid2,31)     get_user_name(player,name2,31)     get_user_name(id,name,31)     log_amx("God Mode: ^"%s<%s><>^" Made ^"%s<%s><>^"A God",     name,authid,name2,authid2)     set_user_godmode(player, 1);     return PLUGIN_HANDLED } {     if (!cmd_access(id,level,cid,2))     return PLUGIN_HANDLED     new arg[32]     read_argv(1,arg,31)     new player = cmd_target(id,arg,8)     new authid[32],authid2[32],name2[32],name[32]     get_user_authid(id,authid,31)     get_user_authid(player,authid2,31)     get_user_name(player,name2,31)     get_user_name(id,name,31)     if (!player) return PLUGIN_HANDLED     if (!get_user_godmode(player))     {       return PLUGIN_HANDLED         }     else     {     log_amx("God Mode: ^"%s<%s><>^" Made ^"%s<%s><>^"A Mortal",     name,authid,name2,authid2)     set_user_godmode(player, 0);     return PLUGIN_HANDLED     }     return PLUGIN_HANDLED } public cmdfast(id, level, cid) {     if (!cmd_access(id,level,cid2))     return PLUGIN_HANDLED     new arg[32]     read_argv(1,arg,31)     new player = cmd_target(id,arg,8)     if (!player) return PLUGIN_HANDLED     new authid[32],authid2[32],name2[32],name[32]     get_user_authid(id,authid,31)     get_user_authid(player,authid2,31)     get_user_name(player,name2,31)     get_user_name(id,name,31)     log_amx("speed: ^"%s<%s><>^" Made ^"%s<%s><>^"go faster!",     name,authid,name2,authid2)     set_user_maxspeed(id,750.0)     set_cvar_num("sv_maxspeed", 750)     return PLUGIN_HANDLED } public cmdunfast(id, level, cid) {     if (!cmd_access(id,level,cid2))     return PLUGIN_HANDLED     new arg[32]     read_argv(1,arg,31)     new player = cmd_target(id,arg,8)     if (!player) return PLUGIN_HANDLED     new authid[32],authid2[32],name2[32],name[32]     get_user_authid(id,authid,31)     get_user_authid(player,authid2,31)     get_user_name(player,name2,31)     get_user_name(id,name,31)     log_amx("speed: ^"%s<%s><>^" Made ^"%s<%s><>^"go normal speed!",     name,authid,name2,authid2)     set_user_maxspeed(id,320.0)     set_cvar_num("sv_maxspeed", 320)     return PLUGIN_HANDLED }
svendude is offline
Send a message via Yahoo to svendude
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 08-31-2004 , 20:41  
Reply With Quote #22

Svendue want to just make a smaller plugin that makes everyone have godmode at the start of the round? Would be easier for you to work off of.
Peli is offline
Send a message via MSN to Peli
elmerfudd
New Member
Join Date: Aug 2004
Old 08-31-2004 , 20:47  
Reply With Quote #23

hey, just a tip newbie to newbie: dont use the fun or amxmod modules. instead, use the engine and amxmodx modules. im not sure if amxmisc even exists anymore. Someone with more experience, please do correct me.

I think that this was very good for a first post here...
elmerfudd is offline
svendude
Member
Join Date: Aug 2004
Old 08-31-2004 , 22:14  
Reply With Quote #24

Quote:
Originally Posted by Peli
Svendue want to just make a smaller plugin that makes everyone have godmode at the start of the round? Would be easier for you to work off of.
ok sure, i had hard time with this plugin =D
svendude is offline
Send a message via Yahoo to svendude
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 09-01-2004 , 00:39  
Reply With Quote #25

Quote:
Originally Posted by elmerfudd
hey, just a tip newbie to newbie: dont use the fun or amxmod modules. instead, use the engine and amxmodx modules. im not sure if amxmisc even exists anymore. Someone with more experience, please do correct me.

I think that this was very good for a first post here...
You can use Fun.inc and Amxmisc.inc but do not use Amxmod.inc , use Amxmodx.inc.
Quote:
Originally Posted by svendude
ok sure, i had hard time with this plugin =D
Here is a pretty simple plugin that gives everyone godmode at the start of the round , untested but compiled with no errors :
Code:
#include <amxmodx> // You need this so it can use Amxmodx.inc natives #include <fun> // You need this so it can use Fun.inc natives public plugin_init() // This is where you register stuff , like plugin name/version/author , cvars , client commands etc. {     register_plugin("Godmode","0.1","Svendude")     register_event("ResetHUD","god_on","b") } public god_on(id) // This is the godmode function I registered in the plugin_init() above {     set_user_godmode(id,1) // This sets someone to godmode     set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 5.0, 0.5, 1.5, 4) // This makes a hudmessage ( center of the screen )     show_hudmessage(0, "Everyone has godmode") // This is the actual message        return PLUGIN_HANDLED }
Peli is offline
Send a message via MSN to Peli
svendude
Member
Join Date: Aug 2004
Old 09-01-2004 , 05:37  
Reply With Quote #26

omg WOW! thats easy!!! thx! =)
svendude is offline
Send a message via Yahoo to svendude
Votorx
Senior Member
Join Date: Jun 2004
Old 09-01-2004 , 14:10  
Reply With Quote #27

Quote:
hey, just a tip newbie to newbie: dont use the fun or amxmod modules. instead, use the engine and amxmodx modules. im not sure if amxmisc even exists anymore. Someone with more experience, please do correct me.
Amxmisc is used all the time to set restrictions to certain plugins. Without it people could give themselves god mode or slay anyone they want all the time. Althought you can mimic alot of the functions in the other include files I wouldn't recommend it since its harder to read and harder to do.

Svendude, the plugin I gave you is a bit excessive as it logs every action in the plugin. Don't even bother trying to log things unless you really want to keep track of your server. If I were to remake that plugin I could possibly deleate like over 100 lines of code and still generate the same effect.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
svendude
Member
Join Date: Aug 2004
Old 09-01-2004 , 18:04  
Reply With Quote #28

i know, i say the log thing, i just thought i HAD to put the log thing, btw if some1 would be kind enough to point out my mistakes, i would greatly appriciate it =D
svendude is offline
Send a message via Yahoo to svendude
Votorx
Senior Member
Join Date: Jun 2004
Old 09-02-2004 , 14:11  
Reply With Quote #29

Quote:
btw if some1 would be kind enough to point out my mistakes
Part of learning how to code is finding your own mistakes and correcting them yourself. If you have problems after that then you come searching for help.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
svendude
Member
Join Date: Aug 2004
Old 09-02-2004 , 17:58  
Reply With Quote #30

will do =) i see 2 of my mistakes, but thats about it =D im still looking for some though
svendude is offline
Send a message via Yahoo to svendude
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 08:25.


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