[Help ME] Help with vehicles /enter and /exit.
#1

Hello.

I need the help in making vehicle /enter or /exit system. lets suppose that there is a wall and I want a /enter and /exit system between them. How to create the script in which we make vehicles or people /enter, /exit system.

I appreciate Your Help.
Reply
#2

Can you specify a little better?
Reply
#3

sorry for my bad english.

I need a system of vehicle enter or exit system. lets suppose we make a garage underground but the gate is not openable, I need to take my vehicle in the garage by system of enter/exit. same the system that we enter in house and any biz by using /enter command and exit by /exit command. but i need vehicle enter and exit command by using coordinates .
Reply
#4

Get the entrance coordinates and the exit coordinates. Use
pawn Код:
IsPlayerInRangeOfPoint
so that you cannot /enter at any place
Reply
#5

pawn Код:
// In ZCMD:
CMD:enter(playerid, params[])
{
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) == 0) {
        SetPlayerPos(playerid, X, Y, Z); // Coordinates from enter..
    else {
        SendClientMessage(playerid, -1, "You need to be driver to enter ...");
    }
    return 1;
}
CMD:exit(playerid, params[])
{
    SetPlayerPos(playerid, X, Y, Z); // Coordinates from exit..
    return 1;
}

================================================================================

// In Strcmp:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/enter", true)) {
        if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) == 0) {
            SetPlayerPos(playerid, X, Y, Z); // Coordinates from enter..
        else {
            SendClientMessage(playerid, -1, "You need to be driver to enter ...");
        }
        return 1;
    }
    if(!strcmp(cmdtext, "/exit", true)) {
        SetPlayerPos(playerid, X, Y, Z); // Coordinates from exit..
        return 1;
    }
    // Rest Of Code
    return 0;
}
Reply
#6

Thank you Friends!

I appreciate your help and 1 rep for each to help me.
Reply
#7

<Deleted since the solution has already been provided.>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)