Raised This Month: $ Target: $400
 0% 

help >_<


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aer0nz
Junior Member
Join Date: Feb 2007
Old 12-02-2007 , 21:12   help >_<
Reply With Quote #1

Code:
public Loc_Check(id)
{
    new Float:gunshop[3] = {-2504.0, 150.0, -413.0};
    new origin[3]
    get_user_origin(id,origin);
    
    if(get_distance(origin, gunshop) <= 164.0) {
        client_print(id,print_chat,"* [GUN] So, what kind of weapons are you interested in?")
        Main_Menu(id)
}
    else {
        client_print(id,print_chat,"* [GUN] You must be near the gunshop in order to recieve guns!")
    }
}
okay so heres a snippet, i want it to display the menu if im near the coordinates specified, the full plugin compiles, but with a tag mismatch, and if i say my command not near the location, it says i must be near the gunshop, which is what i want, but if i do it near where i want it to work, it says im not close enough.
aer0nz is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 12-02-2007 , 21:19   Re: help >_<
Reply With Quote #2

I don't have very much experience with get_distance() but you can try this (fixed the tag mismatch error):

PHP Code:
public Loc_Check(id)
{
    new 
gunshop[3] = {-2504150, -413};
    new 
origin[3]
    
get_user_origin(id,origin);
    
    if(
get_distance(origingunshop) <= 164) {
        
client_print(id,print_chat,"* [GUN] So, what kind of weapons are you interested in?")
        
Main_Menu(id)
    }
    else {
        
client_print(id,print_chat,"* [GUN] You must be near the gunshop in order to recieve guns!")
    }

__________________
M249-M4A1 is offline
Reply


Thread Tools
Display Modes

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 11:01.


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