16.05.2011, 06:17
You could store the positions in a variable.
pawn Код:
new
Float:ASP[][] = {
{minx, miny, maxx, maxy},
{minx, miny, maxx, maxy}
};
new
iRand = random(sizeof(RandomSpawns));
SetPlayerInArea(playerid, ASP[iRand][0], ASP[iRand][1], ASP[iRand][2], ASP[iRand][3]);
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);
}