Propadanje kroz pod

Započeo Samky87, Oktobar 04, 2017, 22:36:21 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: YUB
Detaljan opis problema: Kada izlazim iz stana ( /izlaz ), često prodjem kroz pod, padam sa neba i stvori me kod farme.
Dio skripte: CMD:izlaz(playerid, params[])
{
// new string[256];
new sendername[MAX_PLAYER_NAME];
    if(IgracLogovan[playerid] == 1)
{
    imeigraca(playerid,sendername);
         if (PlayerToPoint(8.0, playerid,610.1778,-124.6840,997.9922))
    {
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,2035.9196,-1294.9993,20.9342);
     }
if(PlayerInfo[playerid][pPosao] == 5)
{
            if(IsPlayerInRangeOfPoint( playerid, 2, 473.7995, -21.3312, 1002.6869))
            {
//format(string,256,"%s izlazi iz DeeJay kabine...",sendername);
//ProxDetector(30.0, playerid, string, 0xF7B9FCAA,0xEDB1F1AA,0xE2AAE6AA,0xE2AAE6AA,0xD29ED6AA);
            SetPlayerPos(playerid,474.6492, -22.0465, 1003.7098);
            }
            }
    if(IsPlayerInRangeOfPoint(playerid, 3, Houses[PlayerInfo[playerid][pInHouse]][hInteriorX], Houses[PlayerInfo[playerid][pInHouse] ][hInteriorY], Houses[PlayerInfo[playerid][pInHouse] ][hInteriorZ]) )
    {
        SetPlayerVirtualWorld( playerid, 0 );
        SetPlayerInterior( playerid, 0);
        SetPlayerPos( playerid, Houses[PlayerInfo[playerid][pInHouse]][hExteriorX], Houses[PlayerInfo[playerid][pInHouse]][hExteriorY], Houses[PlayerInfo[playerid][pInHouse]][hExteriorZ]);
    }
    if(IsPlayerInRangeOfPoint(playerid, 3, Stan[PlayerInfo[playerid][pInStan]][sInteriorX], Stan[PlayerInfo[playerid][pInStan]][sInteriorY], Stan[PlayerInfo[playerid][pInStan] ][sInteriorZ]) )
    {
        SetPlayerVirtualWorld( playerid, 0 );
        SetPlayerInterior( playerid, 0);
        SetPlayerPos( playerid, Stan[PlayerInfo[playerid][pInStan]][sExteriorX], Stan[PlayerInfo[playerid][pInStan]][sExteriorY], Stan[PlayerInfo[playerid][pInStan] ][sExteriorZ]);
SetPVarInt(playerid, "ulazakustan", 0);
SetPVarInt(playerid, "ulazakuvik", 0);
    }
    if(IsPlayerInRangeOfPoint(playerid, 3, Vikendica[PlayerInfo[playerid][pInVikendica]][vInteriorX], Vikendica[PlayerInfo[playerid][pInVikendica]][vInteriorY], Vikendica[PlayerInfo[playerid][pInVikendica] ][vInteriorZ]) )
    {
        SetPlayerVirtualWorld( playerid, 0 );
        SetPlayerInterior( playerid, 0);
        SetPlayerPos( playerid, Vikendica[PlayerInfo[playerid][pInVikendica]][vExteriorX], Vikendica[PlayerInfo[playerid][pInVikendica]][vExteriorY], Vikendica[PlayerInfo[playerid][pInVikendica] ][vExteriorZ]);
SetPVarInt(playerid, "ulazakustan", 0);
SetPVarInt(playerid, "ulazakuvik", 0);
    }
for(new i = 0; i <  sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]);
PlayerInfo[playerid][pLocal] = 255;
}
else if(PlayerToPoint(3,playerid,1189.790161,-912.604858,1.311782) || PlayerToPoint(3,playerid,793.063415,-1622.839111,-10.992186) || PlayerToPoint(3,playerid,932.051208,-1353.114013,-22.488183))
{
    OnPlayerExitFood(playerid);
    InAFoodPlace[playerid] = 0;
}
}
new carid = GetPlayerVehicleID(playerid);
if (IsABus(carid))
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
if (BusrouteEast[playerid][0] != 0 || BusrouteWest[playerid][0] != 0) BusrouteEnd(playerid, carid);
}
if (IsADjubretar(carid))
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
}
if(IsAHarvest(carid))
{
    if (carid != 0)
{
//SetVehicleToRespawn(carid);
}
if(FarmerPickup[playerid][0] >= 1 && FarmerPickup[playerid][0] <= 22)
{
FarmerPickup[playerid][0]--;
}
    TogglePlayerControllable(playerid, 1);
    RemovePlayerFromVehicle(playerid);
    FarmerVar[playerid] = 0;
    DisablePlayerCheckpoint(playerid);

}
if(IsAFarmerTraktor(carid))
{
    if (carid != 0)
    {
        //SetVehicleToRespawn(carid);
    }
    if(TraktorFarmerPickup[playerid][0] >= 1 && TraktorFarmerPickup[playerid][0] <= 37)
    {
        TraktorFarmerPickup[playerid][0]--;
    }
    TogglePlayerControllable(playerid, 1);
    RemovePlayerFromVehicle(playerid);
    TraktorFarmerVar[playerid] = 0;
    DisablePlayerCheckpoint(playerid);
}
    if(IsPlayerInAnyVehicle(playerid) && !engineOn[GetPlayerVehicleID(playerid)] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
}
if(GetPlayerVehicleID(playerid) >= 113 && GetPlayerVehicleID(playerid) <= 160 || GetPlayerVehicleID(playerid) >= 161 && GetPlayerVehicleID(playerid) <= 210)
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
}
else if (PlayerToPoint(3.0, playerid,387.7978,173.8582,1008.3828))
{
    SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1500.3016,-1776.0984,15.4103);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if (PlayerToPoint(6.0, playerid,-1404.5299,-259.0602,1043.6563))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,2695.6235,-1704.6960,11.8438);
}
else if (PlayerToPoint(8.0, playerid,-1443.0554,-581.1879,1055.0472))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,-2111.5686,-443.9720,38.7344);
}
else if (PlayerToPoint(8.0, playerid,-1464.7732,1557.5533,1052.5313))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,-2080.3079,-406.0309,38.7344);
}
if(PlayerInfo[playerid][pClan] == 10 || PlayerInfo[playerid][pLider] == 10)
{
            if(IsPlayerInRangeOfPoint( playerid, 4, 1738.4020,-1097.9707,24.0781))
            {
            SetPlayerPos(playerid, 1739.7717,-1098.2390,24.0781);
            }
            }
            if(PlayerInfo[playerid][pClan] == 10 || PlayerInfo[playerid][pLider] == 10)
{
            if(IsPlayerInRangeOfPoint( playerid, 4, 1738.5054,-1139.1788,24.0781))
            {
            SetPlayerPos(playerid, 1739.5889,-1138.9215,24.0781);
            }
            }
else if(NoFuel[playerid] == 1)
{
    TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
NoFuel[playerid] = 0;
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): /
Poslednja Izmena: Oktobar 05, 2017, 03:07:37 PRE PODNE od Łuk@

Vidi da zalediš igrača koji koristi komandu na 1 sec, ali ipak ukoliko ti nije stan na farmi, a baca te na farmu, vjerojatno ti PlayerInfo[playerid][pInStan] se ne postavlja dobro.

Možeš mi napisati kako da zaledim na 1 sekundu ?
npr. kada ukucam komandu da me zaledi na 1 sekundu

Na komandu:
[pawn]SetTimerEx("Odledi", 1000, false, "i", playerid); // 1000 ms = 1 sekunda - tajmer
TogglePlayerControllable(playerid, 0); //zaledjuje igraca[/pawn]

Negdje u skripti, funkcija za odledjivanje:
[pawn]forward Odledi(playerid);
public Odledi(playerid)
{
    TogglePlayerControllable(playerid, 1);
    return 1;
}[/pawn]

Ja sam ovako napisao i ne izbacuje error. Nadam se da će raditi :)
if(IsPlayerInRangeOfPoint(playerid, 3, Stan[PlayerInfo[playerid][pInStan]][sInteriorX], Stan[PlayerInfo[playerid][pInStan]][sInteriorY], Stan[PlayerInfo[playerid][pInStan] ][sInteriorZ]) )
    {
        SetPlayerVirtualWorld( playerid, 0 );
        SetPlayerInterior( playerid, 0);
        SetPlayerPos( playerid, Stan[PlayerInfo[playerid][pInStan]][sExteriorX], Stan[PlayerInfo[playerid][pInStan]][sExteriorY], Stan[PlayerInfo[playerid][pInStan] ][sExteriorZ]);
                        TogglePlayerControllable(playerid, 0);
                        SetTimerEx("Odledi", 1000, false, "i", playerid); // 1000 ms = 1 sekunda - tajmer
                        TogglePlayerControllable(playerid, 1);
SetPVarInt(playerid, "ulazakustan", 0);
SetPVarInt(playerid, "ulazakuvik", 0);
    }

Ne radi ovo. Opet me stvori kod farme. Znači kada izadjem iz stana,stvori me ispred stana i onda propadam kroz zemlju i stvori me kod farme ( na kordinatama 0 0 0 )..