How would I make this into multiple places.
#9

Quote:
Originally Posted by Quickie
Посмотреть сообщение
if youre making "multiple"
store them in n array so you can loop check to them
pawn Код:
new entrance[][]=
{
{x,y,z},
{x,y,z},
{x,y,z},
...
};
new exit[][]=
{
{x,y,z},
{x,y,z},
...
};
new entranceTele[][]=
{
{x,y,z,interior,virtualworld},
{x,y,z,interior,virtualworld},
....
};
new exitTele[][]=
{
{x,y,z,interior,virtualworld},
{x,y,z,interior,virtualworld},
...
};
CMD:enter(playerid, params[])
{
    for(new i;i!=sizeof(entrance);i++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0,entrance[i][0],entrance[i][1],entrance[i][2]))
        {
            SetPlayerPos(playerid, entranceTele[i][0],entranceTele[i][1],entranceTele[i][2]);
            SetPlayerInterior(playerid, entranceTele[i][3]);
            SetPlayerVirtualWorld(playerid, entranceTele[i][4]);
            SetCameraBehindPlayer(playerid);
            break;
        }
    }
    return 1;
}
CMD:exit(playerid, params[])
{
    for(new i;i!=sizeof(entrance);i++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0,exit[i][0],exit[i][1],exit[i][2]))
        {
            SetPlayerPos(playerid, exitTele[i][0],exitTele[i][1],exitTele[i][2]);
            SetPlayerInterior(playerid, exitTele[i][3]);
            SetPlayerVirtualWorld(playerid, exitTele[i][4]);
            SetCameraBehindPlayer(playerid);
            break;
        }
    }
    return 1;
}
And so I just put all of the extra stuff ontop of my cmds?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)