Raised This Month: $ Target: $400
 0% 

PCVAR Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-01-2010 , 13:42   PCVAR Help
Reply With Quote #1

So, as I'm sitting here customizing xPaw's HnS Shop to fit my server's needs, I came across this, and I'm unsure of what I should put in here.
Code:
 
// Pcvars
new plugin_on, silentcost, stealthcost, noflashcost, hpcost, armorcost, grenadecost, awpcost, speedcost, godmodecost;
new allowsilent, allowstealth, allownoflash, allowhp, allowarmor, allowgrenade, allowawp, allowspeed, allowgodmode;
new usersilent[33], userstealth[33], usernoflash[33], userhp[33], userarmor[33], usergrenade[33], userawp[33], userspeed[33];
new hpcvar, armorcvar, menu, hasspeed[33], hassilent[33], gotgodmode[33], hasgodmode[33], mess[33], mess2[33];
new g_msgScreenFade, g_msgMoney, grenade[32], EDITEDITEDITEDIT last;
What I'm trying to do is implement an AWP in the plugin, and remove the gravity optio. I've removed everything to do with gravity. All I need is the pcvar for the awp. I assumed that the awp pcvar should be defined with the grenade, so I put the EDITEDITEDIT next to the grenade. Any help would be appreciated!
wrecked_ is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-01-2010 , 14:59   Re: PCVAR Help
Reply With Quote #2

It doesn't matter where you initialize the var here.
__________________
Arkshine is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-01-2010 , 15:06   Re: PCVAR Help
Reply With Quote #3

Alright, my main issue though is what I'm supposed to make the var. I noticed that grenade is just grenade[32], should I make the awp pcvar awp[32]? What does the 32 mean?
wrecked_ is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-01-2010 , 16:10   Re: PCVAR Help
Reply With Quote #4

bump(:
wrecked_ is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-01-2010 , 16:13   Re: PCVAR Help
Reply With Quote #5

What are you trying to do ? You know what is a pcvar ? It seems not otherwise you would not ask. It's the pointer given by register_cvar() used by get_pcvar_*() ; so it means you have created a cvar ?
__________________
Arkshine is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-01-2010 , 16:26   Re: PCVAR Help
Reply With Quote #6

I understand what you're saying, but if you look in the code above, it says that those are pcvars. I completely understand what a pcvar is but these are labeled as pcvars. I'm working on coding and getting to understand the different parts of it, and those were labeled pcvars. All I'm trying to do is get the awp equivalent to the grenade[32] that's labeled there. Any help would be appreciated...
wrecked_ is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-01-2010 , 17:01   Re: PCVAR Help
Reply With Quote #7

bump
wrecked_ is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-01-2010 , 17:07   Re: PCVAR Help
Reply With Quote #8

It's a joke ? You bump 30 minutes after the last. You are going to bump each 30 minutes ? You think people are machines ? There are rules, follow them. Wait 15 days before bumping.
__________________
Arkshine is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-01-2010 , 17:13   Re: PCVAR Help
Reply With Quote #9

Alrighty. I won't bump anymore, sir. Just trying to get this done.
wrecked_ is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-01-2010 , 18:59   Re: PCVAR Help
Reply With Quote #10

Problem solved, the pcvar was unneeded.
wrecked_ 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 04:07.


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