So noobish you might roll your eyes - Thanks.
#4

You mean this ?

pawn Код:
CMD:top(playerid,params[])
{
    #pragma unused params
    new Float:x, Float:y, Float:z; // Creating 3 Variables for coords
    GetPlayerPos(playerid, x, y, z); // Getting Player Pos
    new Float:nearest = 99999.0, object = -1;
    for(new o = 0; i < MAX_OBJECTS; o++) // Checking the nearest build
    {
        if(IsValidObject(o) && GetPlayerDistanceFromPoint(playerid, x, y, z) < nearest)
        {
            object = o;
            nearest = GetPlayerDistanceFromPoint(playerid, x, y, z);
        }
    }
    if(object == -1)
    {
        SendClientMessage(playerid, -1, "No building nearby.");
    }
    else
    {
        new Float:ox, Float:oy, Float:oz;
        GetObjectPos(object, ox, oy, oz);
        SetPlayerPos(playerid, ox + 2, oy + 1, oz);
    }
    return 1;
}
Reply


Messages In This Thread
So noobish you might roll your eyes - Thanks. - by RajatPawar - 31.10.2012, 14:30
Re: So noobish you might roll your eyes - Thanks. - by SuperViper - 31.10.2012, 14:36
Re: So noobish you might roll your eyes - Thanks. - by [HK]Ryder[AN] - 31.10.2012, 14:38
AW: So noobish you might roll your eyes - Thanks. - by Skimmer - 31.10.2012, 14:38

Forum Jump:


Users browsing this thread: 1 Guest(s)