16.05.2011, 05:51
i got this stock:
it teleports the player to the middle of the area.
how can i teleport the player to a random pos in the area?
pawn Код:
stock SetPlayerInArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy)
{
new Float:x = floatsub(maxx,floatdiv(floatsub(maxx,minx),2));
new Float:y = floatsub(maxy,floatdiv(floatsub(maxy,miny),2));
return SetPlayerPosFindZ(playerid, x, y, 1000.0);
}
how can i teleport the player to a random pos in the area?