IsPlayerNearObject - Problem
#1

Hey guys,

I made a command
pawn Код:
CMD:open(playerid, params[])
{
    if(IsPlayerNearObject(playerid, 2358, 4.0))
    {
        GivePlayerWeapon(playerid, 24, 1000);
        GivePlayerWeapon(playerid, 29, 1000);
        SendClientMessage(playerid, 0xFFF000,"You had found the Box! Now you are allowed to kill");
        SendClientMessage(playerid, 0xFFF000,"Some weapons have been given to you.");
    }
    else if(!IsPlayerNearObject(playerid, 2358, 10.0))
    {
        SendClientMessage(playerid, 0xFFFF00AA,"Dont Waste time.. find the box!");
    }
    return 1;
}
Its not working fine.
When im standing next to the object id 2358, it says :- Dont waste time... find the box!.

My IsPlayerNearObject stock :-
pawn Код:
stock IsPlayerNearObject(playerid, objectid, Float:range)
{
    new Float:X, Float:Y, Float:Z;
    GetObjectPos(objectid, X, Y, Z);
    if(IsPlayerInRangeOfPoint(playerid, range, X, Y, Z))return true;
    return false;
}
Can anyone help me?
thanks
Reply


Messages In This Thread
IsPlayerNearObject - Problem - by Avi Raj - 14.02.2014, 12:43
Re: IsPlayerNearObject - Problem - by newbienoob - 14.02.2014, 12:51
Re: IsPlayerNearObject - Problem - by Konstantinos - 14.02.2014, 12:52
Re: IsPlayerNearObject - Problem - by CuervO - 14.02.2014, 12:53
Re: IsPlayerNearObject - Problem - by Avi Raj - 14.02.2014, 12:53
Re: IsPlayerNearObject - Problem - by Konstantinos - 14.02.2014, 12:56
Re: IsPlayerNearObject - Problem - by CuervO - 14.02.2014, 12:57
Re: IsPlayerNearObject - Problem - by Avi Raj - 14.02.2014, 13:00
Re: IsPlayerNearObject - Problem - by Konstantinos - 14.02.2014, 13:01
Re: IsPlayerNearObject - Problem - by Avi Raj - 14.02.2014, 13:05

Forum Jump:


Users browsing this thread: 1 Guest(s)