entergarage pwnt
#1

Hey, tried to make a command to enter a player or player along with their car inside their garage, doesnt seem to work.
How ever i am in a vehicle when i attempt the command , all it does is tp's only me in the garage and i cant see my vehicle, also i can see the minimap means it also sets my interior to 0. There's the command.
pawn Код:
CMD:entergarage(playerid, params[])
{
    for (new idx = 0; idx < sizeof (GarageInfo); idx++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2, GarageInfo[idx][gX], GarageInfo[idx][gY], GarageInfo[idx][gZ]))
        {
            if(!GarageInfo[idx][gStatus] && PlayerInfo[playerid][pGarage] != idx && PlayerInfo[playerid][pVGarage] != idx) return SendClientMessage(playerid, COLOR_GREY, "This garage is locked by its owner.");
            new string[128], seat;
            format(string, sizeof(string), "** %s pushes the shutter and enters the garage.", RPN(playerid));
            SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
            if(GarageInfo[idx][gLevel] == 1 && !IsPlayerInAnyVehicle(playerid))
            {
                SetPlayerPos(playerid, -73.0052,-18.5942,972.5516);
                SetPlayerFacingAngle(playerid, 6.7155);
                SetPlayerInterior(playerid, 14);
                SetPlayerVirtualWorld(playerid, idx+500);
            }
            else if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
                new carid = GetPlayerVehicleID(playerid);
                SetVehiclePos(carid, -73.0052,-18.5942,972.5516);
                SetVehicleZAngle(carid, 6.7155);
                LinkVehicleToInterior(carid, 14);
                PutPlayerInVehicle(playerid, carid, seat);
                SetVehicleVirtualWorld(carid, idx+500);
            }
            SetCameraBehindPlayer(playerid);
            break;
        }
    }
    return 1;
}
Reply
#2

Help?
Reply
#3

Quote:
Originally Posted by Imperor
Посмотреть сообщение
Help?
pawn Код:
COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE
I just have one thing to point out, COLOR_PURPLE.

OT: It took me a while but I found the problem:

pawn Код:
PutPlayerInVehicle(playerid, carid, seat);
You never defined what the seat is.
Reply
#4

Whats there?, I am using zG script its everywhere there where it sends nearby message.
Reply
#5

Quote:
Originally Posted by Imperor
Посмотреть сообщение
Whats there?, I am using zG script its everywhere there where it sends nearby message.
Edited previous post.
Reply
#6

It was a problem before adding PutPlayerInVehicle.
Reply
#7

BUMP
Reply
#8

24 hours now, BUMP
Reply
#9

24 Hours again, BUMP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)