AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   PCVAR Help (https://forums.alliedmods.net/showthread.php?t=114038)

wrecked_ 01-01-2010 13:42

PCVAR Help
 
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!

Arkshine 01-01-2010 14:59

Re: PCVAR Help
 
It doesn't matter where you initialize the var here.

wrecked_ 01-01-2010 15:06

Re: PCVAR Help
 
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_ 01-01-2010 16:10

Re: PCVAR Help
 
bump(:

Arkshine 01-01-2010 16:13

Re: PCVAR Help
 
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 ?

wrecked_ 01-01-2010 16:26

Re: PCVAR Help
 
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_ 01-01-2010 17:01

Re: PCVAR Help
 
bump

Arkshine 01-01-2010 17:07

Re: PCVAR Help
 
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.

wrecked_ 01-01-2010 17:13

Re: PCVAR Help
 
Alrighty. I won't bump anymore, sir. Just trying to get this done.

wrecked_ 01-01-2010 18:59

Re: PCVAR Help
 
Problem solved, the pcvar was unneeded.


All times are GMT -4. The time now is 04:07.

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