Raised This Month: $ Target: $400
 0% 

Employment MOD Help TSRP Amxx 1.7


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kenx187x
Junior Member
Join Date: Jun 2006
Old 06-13-2006 , 17:55  
Reply With Quote #1

nvm have one made has some errors fixing them thought
kenx187x is offline
BetaX
Member
Join Date: Nov 2005
Old 06-13-2006 , 19:16  
Reply With Quote #2

Quote:
Originally Posted by Lord_Destros
Ummmm, that shouldn't work at all.

1. You never created a method named clcmd_buy
2. You never set origin on where NPC (the store only, not the model) should appear, I believe this would cause /buy to work anywhere around the map.

Yes, yes, i know you said this wouldn't work, just pointin it out though .
Really, all the NPC is is a model, you simply see if the person is in a certain area, and if they are, and they have hit /buy, then show the menu.

Suzuka's first tutorial ( http://forums.alliedmods.net/showthread.php?t=11756 ) will make the NPC's model, but she did NOT make a cashier or anything like that. Just a model that stays in place and you cannot pass through it.

Code:
register_cvar("rp_position_gunshop","-2407 144 -411") // Gunshop Position (Mecklenburg_B8v6 Default)

Then later, . . .

Code:
    if(get_distance(origin,gunshop) <= 35.0)     {         Gunshop_Main(id)     }

Where Origin is simply where the player is currently, and gunshop is the X, Y, Z coordinates of where the Gunshop NPC is.

And if you're close enough, it forwards your ID to Gunshop_Main, where it checks if you want to buy something (I think? >> )

So you could get the client command, and then check your distance from the Gunshop or whatever else, and if it's less than a certain number, go ahead and make your menu. o.o

Edit: Forgot to add, those code snippets were from Harbu's plugin.
BetaX is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 06-14-2006 , 08:48  
Reply With Quote #3

Quote:
Originally Posted by BetaX
Quote:
Originally Posted by Lord_Destros
Ummmm, that shouldn't work at all.

1. You never created a method named clcmd_buy
2. You never set origin on where NPC (the store only, not the model) should appear, I believe this would cause /buy to work anywhere around the map.

Yes, yes, i know you said this wouldn't work, just pointin it out though .
Really, all the NPC is is a model, you simply see if the person is in a certain area, and if they are, and they have hit /buy, then show the menu.

Suzuka's first tutorial ( http://forums.alliedmods.net/showthread.php?t=11756 ) will make the NPC's model, but she did NOT make a cashier or anything like that. Just a model that stays in place and you cannot pass through it.

Code:
register_cvar("rp_position_gunshop","-2407 144 -411") // Gunshop Position (Mecklenburg_B8v6 Default)

Then later, . . .

Code:
    if(get_distance(origin,gunshop) <= 35.0)     {         Gunshop_Main(id)     }

Where Origin is simply where the player is currently, and gunshop is the X, Y, Z coordinates of where the Gunshop NPC is.

And if you're close enough, it forwards your ID to Gunshop_Main, where it checks if you want to buy something (I think? >> )

So you could get the client command, and then check your distance from the Gunshop or whatever else, and if it's less than a certain number, go ahead and make your menu. o.o

Edit: Forgot to add, those code snippets were from Harbu's plugin.
Don't forget that Harbu uses this function to convert cvars into arrays: cvar_to_array
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
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:09.


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