26.03.2010, 21:14
how can i make that if i do a cmd like /tree
that if somebody get close to the object dies ?
if i do that cmd there will be a tree
then if with a timer that checks if there i anyone near that tree and kills it
but how do i make that
( the part with checking if he is near the tree )
that if somebody get close to the object dies ?
pawn Код:
if(strcmp(cmd, "/tree", true) == 0)
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
CreateObject(2892, x, y, z-0.6, 0.0, 0.0, a+90.0);
return 1;
}
then if with a timer that checks if there i anyone near that tree and kills it
but how do i make that
( the part with checking if he is near the tree )