SetPlayerInArea
#8

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);
}
Reply


Messages In This Thread
SetPlayerInArea - by xDeadlyBoy - 16.05.2011, 05:51
Re: SetPlayerInArea - by Markx - 16.05.2011, 06:02
Re: SetPlayerInArea - by xDeadlyBoy - 16.05.2011, 06:03
Re: SetPlayerInArea - by Backwardsman97 - 16.05.2011, 06:04
Re: SetPlayerInArea - by xDeadlyBoy - 16.05.2011, 06:06
Re: SetPlayerInArea - by Backwardsman97 - 16.05.2011, 06:07
Re: SetPlayerInArea - by xDeadlyBoy - 16.05.2011, 06:11
Re: SetPlayerInArea - by [L3th4l] - 16.05.2011, 06:17
Re: SetPlayerInArea - by xDeadlyBoy - 16.05.2011, 06:21
Re: SetPlayerInArea - by Backwardsman97 - 16.05.2011, 06:23

Forum Jump:


Users browsing this thread: 2 Guest(s)