26.03.2010, 21:23
pawn Код:
new tree;
pawn Код:
if(strcmp(cmd, "/tree", true) == 0)
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
tree = CreateObject(2892, x, y, z-0.6, 0.0, 0.0, a+90.0);
return 1;
}
pawn Код:
new Float:x, Float:y, Float:z;
GetObjectPos(tree, x, y, z);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 3.0, x, y, z))
{
SetPlayerHealth(i, 0);
}
}
}

