[Help] Position fail exterior pls help
#1

Hello, I need to get out of this whole car garage I go out and not stagnate in this way, here I leave the command, I need something else?

+ Rep to you can help me please.

COMMAND:
Код:
CMD:gsalir(playerid,params[])
{
        if(lastGarage[playerid] >= 0)
        {
            new lg = lastGarage[playerid];
            if(!IsPlayerInAnyVehicle(playerid))
            {
                SetPlayerPos(playerid,gInfo[lg][PosX],gInfo[lg][PosY],gInfo[lg][PosZ]);
                SetPlayerInterior(playerid,0);
                SetPlayerVirtualWorld(playerid,0);
                }
                else
                {
                    new vid = GetPlayerVehicleID(playerid);
                    LinkVehicleToInterior(vid,0);
                    SetVehicleVirtualWorld(vid,0);
                    SetVehiclePos(vid,gInfo[lg][PosX],gInfo[lg][PosY],gInfo[lg][PosZ]);
                    SetPlayerVirtualWorld(playerid,0);
                    SetPlayerInterior(playerid,0);
                }
                lastGarage[playerid] = -999;
        }
        else return SendClientMessage(playerid,COLOR_ERROR,"Error: No estбs en ningun garage.");
        return 1;
}
Reply
#2

Why dont just +1.0 your 'X' ?
pawn Код:
CMD:gsalir(playerid,params[])
{
        if(lastGarage[playerid] >= 0)
        {
            new lg = lastGarage[playerid];
            if(!IsPlayerInAnyVehicle(playerid))
            {
                SetPlayerPos(playerid,gInfo[lg][PosX],gInfo[lg][PosY],gInfo[lg][PosZ]);
                SetPlayerInterior(playerid,0);
                SetPlayerVirtualWorld(playerid,0);
                }
                else
                {
                    new vid = GetPlayerVehicleID(playerid);
                    LinkVehicleToInterior(vid,0);
                    SetVehicleVirtualWorld(vid,0);
                    SetVehiclePos(vid,gInfo[lg][PosX]+1.0,gInfo[lg][PosY],gInfo[lg][PosZ]); //x + 1.0
                    SetPlayerVirtualWorld(playerid,0);
                    SetPlayerInterior(playerid,0);
                }
                lastGarage[playerid] = -999;
        }
        else return SendClientMessage(playerid,COLOR_ERROR,"Error: No estбs en ningun garage.");
        return 1;
}
Reply
#3

With the X position I now know how to adjust it, in my case it was just you subtract not add, thank you very much.


Thanks,
+rep
Reply


Forum Jump:


Users browsing this thread: