Link to interior?
#4

pawn Код:
Shamal[0] = AddStaticVehicle( // enter co-ordinates here
Shamal[1] = AddStaticVehicle ( //

...
CMD:enter(playerid,params[])
{
    new Float:shamx,Float:shamy,Float:shamz;
    new Float:px, Float:py, Float:pz;
    GetPlayerPos(playerid,px,py,pz);
    for(new i = 0; i < sizeof(shamal);i++)
    {
        GetVehiclePos(Shamal[i],shamx,shamy,shamz);
        if(floatsqrt((px-shamx)*(px-shamx)+(py-shamy)*(py-shamy)+(pz-shamz)*(pz-shamz)) < 3) // count the brackets here
        {
             SetPlayerVirtualWorld(playerid,250+i);
             SetPlayerInterior(playerid, 1);
             SetPlayerPos(playerid,2.57, 33.14, 1200);
             break;
         }
    }
    return 1;
}
of course you will need an exit command, which is similar to the enter command, but it checks if the player is in virtual world 250+, gets the location of the corresponding shamal and sets the players position there.

Bonus points if you also give the player a parachute.
Reply


Messages In This Thread
Link to interior? - by BigAl - 11.10.2010, 17:17
Re: Link to interior? - by Jonni8 - 12.10.2010, 09:21
Re: Link to interior? - by Macluawn - 12.10.2010, 10:34
Re: Link to interior? - by Rachael - 12.10.2010, 10:47
Re: Link to interior? - by BigAl - 12.10.2010, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)