Raised This Month: $ Target: $400
 0% 

Making Gangster Mod :)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-31-2006 , 00:47   Making Gangster Mod :)
Reply With Quote #1

Look below to help me with GANGSTER MOD
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-31-2006 , 00:54  
Reply With Quote #2

I am making an XP based mod called Gangster Mod..

EDIT: Look below
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 05-31-2006 , 01:58  
Reply With Quote #3

Ew...
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Kenshin
New Member
Join Date: May 2006
Old 05-31-2006 , 02:19  
Reply With Quote #4

Quote:
Originally Posted by Twilight Suzuka
Ew...
Its not that bad.
__________________
Kenshin is offline
Send a message via AIM to Kenshin
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-31-2006 , 06:40  
Reply With Quote #5

Hey it compiles at least...


I know its bad though.


I just need an example of the new menus...u dont have to put them in for me.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
ZiP*
Senior Member
Join Date: Jul 2004
Old 05-31-2006 , 10:09  
Reply With Quote #6

I'm sure BAILOPAN uses it in his plugin, CSDM. At least that's what he told me.

http://forums.alliedmods.net/showthread.php?t=290
ZiP* is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-31-2006 , 14:47  
Reply With Quote #7

Ok I need help with this...can someone tell me if this is all correct so far?

I know it compiles, but I need to know about functionability.

Code:
// Thanks xuntric for the mod tut #include <amxmodx> #include <cstrike> #include <fun> #include <vault> #define CLASS_NOTHING 0 #define CLASS_GANGSTER 1 #define CLASS_SWAT 2 #define MAXCLASSES 3 new PlayerClass[33] new PlayerXP[33] new PlayerLevel[33] new g_Menu new const CLASSES[MAXCLASSES][] = {     "None",     "Gangster",     "Swat Member" } new msgtext new const LEVELS[10] = {     100,     200,     400,     800,     1600,     3200,     6400,     12800,     25600,     50000 } public plugin_init() {     register_plugin("Gangster Mod", "1.0", "SweatyBanana")     register_cvar("sv_gangstermod", "1")     register_event("DeathMsg", "DeathMsg", "a")     register_cvar("XP_per_kill", "65")     register_cvar("SaveXP", "1")     register_event("ResetHUD", "ResetHud", "b")     msgtext = get_user_msgid("StatusText")     g_Menu = menu_create("Gangster Mod", "Class_Handle")     menu_additem(g_Menu, "Gangster")     menu_additem(g_Menu, "Swat Team") } public SaveXP(id) {     new authid[32];     get_user_authid(id,authid,31);     new vaultkey[64], vaultdata[64];     format(vaultkey,63,"GangsterMod-%s-class",authid);     format(vaultdata,63,"%d",PlayerClass[id]);     set_vaultdata(vaultkey,vaultdata);     format(vaultkey,63,"GangsterMod-%s-xp",authid);     format(vaultdata,63,"%d",PlayerXP[id]);     set_vaultdata(vaultkey,vaultdata);     format(vaultkey,63,"GangsterMod-%s-level",authid);     format(vaultdata,63,"%d",PlayerLevel[id]);     set_vaultdata(vaultkey,vaultdata); } public LoadXP(id) {     new authid[32];     get_user_authid(id,authid,31);     new vaultkey[64], vaultdata[64];     format(vaultkey,63,"GangsterMod-%s-class",authid);     get_vaultdata(vaultkey,vaultdata,63);     PlayerClass[id] = str_to_num(vaultdata);     format(vaultkey,63,"GangsterMod-%s-xp",authid);     get_vaultdata(vaultkey,vaultdata,63);     PlayerXP[id] = str_to_num(vaultdata);     format(vaultkey,63,"GangsterMod-%s-level",authid);     get_vaultdata(vaultkey,vaultdata,63);     PlayerLevel[id] = str_to_num(vaultdata); } public client_connect(id) {     if(get_cvar_num("SaveXP") == 1)     {          LoadXP(id)          client_print(id, print_chat, "[Gangster Mod] XP Loaded!")          client_print(id, print_chat, "[Gangster Mod] You are a %s with level %s and %s XP", PlayerClass[id], PlayerLevel[id], PlayerXP[id])     } } public client_disconnect(id) {     if(get_cvar_num("SaveXP") == 1)     {          SaveXP(id)     } } public Menu_Command(id) {     menu_display(id, g_Menu, 0)     return PLUGIN_HANDLED } public Class_Handle(id, Menu, Item) {     new szCommand[3],  Accesss, Callback     menu_item_getinfo(Menu, Item, Accesss, szCommand, 2, _, _, Callback)     switch(szCommand[0])     {         case '-':         {             return PLUGIN_HANDLED         }         case '1':         {             if(PlayerClass[id] == CLASS_GANGSTER)             {                 client_print(id, print_chat, "[Gangster Mod] You are already a Gangster! Choose something else!")                 Class_Handle(id, Menu, Item)                 return PLUGIN_HANDLED             }             PlayerClass[id] = CLASS_GANGSTER             client_print(id, print_chat, "[Gangster Mod] You are now a Gangster!")         }         case '2':         {             if(PlayerClass[id] == CLASS_SWAT)             {                 client_print(id, print_chat, "[Gangster Mod] You are already a part of the Swat Team! Choose something else!")                 Class_Handle(id, Menu, Item)                 return PLUGIN_HANDLED             }             PlayerClass[id] = CLASS_SWAT             client_print(id, print_chat, "[Gangster Mod] You are now a member of the Swat Team!")         }     }     ShowHUD(id)     return PLUGIN_HANDLED } public ResetHUD(id) {     if(PlayerClass[id] == CLASS_NOTHING)     {         Menu_Command(id)         GivePOWERS(id)     } } public DeathMsg() {     if(get_cvar_num("sv_gangstermod") == 0)     {         return PLUGIN_HANDLED     }     new attacker = read_data(1)     if(PlayerClass[attacker] == CLASS_NOTHING)     {          return PLUGIN_HANDLED     }     if(PlayerLevel[attacker] == 10)     {          return PLUGIN_HANDLED     }     PlayerXP[attacker] += get_cvar_num("XP_per_kill")     if(PlayerXP[attacker] >= LEVELS[PlayerLevel[attacker]])     {          PlayerLevel[attacker] += 1          client_print(attacker, print_chat, "[Gangster Mod] Congratulations! You are now level %i!", PlayerLevel[attacker])          if(get_cvar_num("SaveXP") == 1)          {               SaveXP(attacker)          }          ShowHUD(attacker)     }     ShowHUD(attacker)     return PLUGIN_CONTINUE } public ShowHUD(id) {     new HUD[51]     format(HUD, 50, "[%s]Level: %i XP: %i", CLASSES[PlayerClass[id]], PlayerLevel[id], PlayerXP[id])     message_begin(MSG_ONE, msgtext, {0,0,0}, id)     write_byte(0)     write_string(HUD)     message_end()     return } public GivePOWERS(id) {     if(PlayerClass[id] == CLASS_SWAT)     {         set_user_health(id,150)         cs_set_user_armor(id,100,CsArmorType:CS_ARMOR_VESTHELM)     }     else if(PlayerClass[id] == CLASS_GANGSTER)     {         set_user_health(id,130)         cs_set_user_armor(id,50,CsArmorType:CS_ARMOR_VESTHELM)     }     return PLUGIN_HANDLED }
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Zenith77
Veteran Member
Join Date: Aug 2005
Old 05-31-2006 , 15:05  
Reply With Quote #8

Don't forget to credit xuntric for his mod tutorial
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-31-2006 , 15:08  
Reply With Quote #9

Yea i will post that in the main post.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
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 16:28.


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