14.02.2014, 12:43
Hey guys,
I made a command
Its not working fine.
When im standing next to the object id 2358, it says :- Dont waste time... find the box!.
My IsPlayerNearObject stock :-
Can anyone help me?
thanks
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;
}
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;
}
thanks