Link to interior?
#1

Hello, today i started making a pilot, drift server and i was just wondering how do i link the shamal to an interior because, well its a pilot server so its ideal for the gamemode?
Reply
#2

LinkVehicleToInterior(vehicleid, interiorid)
Reply
#3

I think he ment a interior into a shamal.
Reply
#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
#5

erm... this give me 4 errors! C:\Users\owner\Desktop\server\gamemodes\FsX_Andrea sV1.0.pwn(149) : error 017: undefined symbol "Shamal"
C:\Users\owner\Desktop\server\gamemodes\FsX_Andrea sV1.0.pwn(149) : warning 215: expression has no effect
C:\Users\owner\Desktop\server\gamemodes\FsX_Andrea sV1.0.pwn(149) : error 001: expected token: ";", but found "]"
C:\Users\owner\Desktop\server\gamemodes\FsX_Andrea sV1.0.pwn(149) : error 029: invalid expression, assumed zero
C:\Users\owner\Desktop\server\gamemodes\FsX_Andrea sV1.0.pwn(149) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

thanks for trying to help though
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)