[Ajuda] Garagem lvl
#1

boas alguem me ajuda neste comando?

pawn Код:
CMD:entergarage(playerid, params[])
{
    new string[128];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    for(new idx=1; idx<MAX_GARAGES; idx++) // Dynamic Garages
    {
        if(IsPlayerInRangeOfPoint(playerid, 2, GarageInfo[idx][gX], GarageInfo[idx][gY], GarageInfo[idx][gZ]))
        {
            new vehicleid = GetPlayerVehicleID(playerid);
            if(!GarageInfo[idx][gStatus] && PlayerInfo[playerid][pGarage] != idx) return SendClientMessage(playerid, COLOR_GREY, "This garage is locked.");
            if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            format(string, sizeof(string), "* %s lifts the door and enters the garage.", RPN(playerid));
            SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
            SetPlayerVirtualWorld(playerid, idx+500);
            if(GarageInfo[idx][gLevel] == 1)
            {
                if(IsPlayerInAnyVehicle(playerid))
                {
                    SetVehiclePos(vehicleid, -1749.8448,677.3413,105.1406);
                    SetCameraBehindPlayer(playerid);
                    SetVehicleVirtualWorld(vehicleid, idx+500);
                }
                else
                {
                    SetPlayerPos(playerid, -1749.8448,677.3413,105.1406);
                    SetPlayerInterior(playerid, 0);
                    SetCameraBehindPlayer(playerid);
                }
            }
            return 1;
        }
    }
    return 1;
}
Aqui esta "gLevel" que й a garagem lvl 1, eu criei 10 garagens como adiciono neste comando as restantes garagens?

pawn Код:
if(GarageInfo[idx][gLevel] == 2) //garagem lvl 2
            {
                if(IsPlayerInAnyVehicle(playerid))
                {
                    SetVehiclePos(vehicleid, -1749.8448,677.3413,105.1406);
                    SetCameraBehindPlayer(playerid);
                    SetVehicleVirtualWorld(vehicleid, idx+500);
                }
                else
                {
                    SetPlayerPos(playerid, -1749.8448,677.3413,105.1406);
                    SetPlayerInterior(playerid, 0);
                    SetCameraBehindPlayer(playerid);
                }
agradeзo a ajuda
Reply


Messages In This Thread
Garagem lvl - by MorreJaa - 08.02.2014, 18:23
Re: Garagem lvl - by MorreJaa - 08.02.2014, 22:57

Forum Jump:


Users browsing this thread: 1 Guest(s)