Detecting if im close to a locker point
#9

Heres an example of how to do it. sounds like you only need the if(!PlayerInRangeOfPoint part so use it with your x y z cords the first # 2.2 is the range to be within change it to your range you want them to be in for the dialog to open the next 3 # are your x y z cords. The !PlayerInRangeOfPoint(playerid,range,x,y,z prevents them from opening the locker from anywhere they want so when there at diff cords they will get the msg you aren't near your locker, but when they are at the set cords it will open the dialog.

pawn Code:
CMD:locker(playerid, params[])
{
    new string[128];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(IsACop(playerid))
    {
        if(!IsPlayerInRangeOfPoint(playerid, 2.2,256.2174,77.3295,1004.0344)) return SendClientMessage(playerid, COLOR_GREY, "You aren't near your locker.");
        ShowDialog(playerid, 5);
    }
Reply


Messages In This Thread
Detecting if im close to a locker point - by RLGaming - 28.08.2012, 13:40
Re: Detecting if im close to a locker point - by HuSs3n - 28.08.2012, 13:48
Re: Detecting if im close to a locker point - by RLGaming - 28.08.2012, 13:51
Re: Detecting if im close to a locker point - by RLGaming - 28.08.2012, 18:27
Re: Detecting if im close to a locker point - by RLGaming - 28.08.2012, 19:15
Re: Detecting if im close to a locker point - by RLGaming - 28.08.2012, 20:27
Re: Detecting if im close to a locker point - by iGetty - 29.08.2012, 04:25
Re: Detecting if im close to a locker point - by Socan - 29.08.2012, 05:19
Re: Detecting if im close to a locker point - by tallerin - 29.08.2012, 12:40
Re: Detecting if im close to a locker point - by RLGaming - 07.09.2012, 21:07

Forum Jump:


Users browsing this thread: 1 Guest(s)