Is it possible removing enter/exit pickups
#1

Hi, i am wondering, is it possible removing the exit/enter thingy. I know there is
PHP код:
DisableInteriorEnterExits(); 
But it disables all of them. I'm just looking to disable some of them, not all.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=191130

But you can change them to some other shop
http://forum.sa-mp.com/showpost.php?...21&postcount=7
Reply
#3

Well i was wondering, as i've seen in many other servers too, if let's say for example:
-I make a enter pickup on LS.
- I set the players interior to 6, when he enters [City Planning Department].
- But, when he exits the building, he gets outside to Las Venturas.

How to make it, once he exits, it will set his position where he entered [in LS] and not in LV.
Reply
#4

Save and set player pos on this callback - OnInteriorChange
Reply
#5

I'm using it like this now
PHP код:
new Float:x,Float:y,Float:z;
    if(
newinteriorid == 3)
    {
        
GetPlayerPos(playerid,x,y,z);
    }
    if(
newinteriorid == 0)
    {
        
SetPlayerPos(playerid,x,y,z);
    } 
But, everytime i spawn, i spawn at the 0.0 0.0 0.0 co-ordinates near that farm?
Reply
#6

Quote:
Originally Posted by Escobabe
Посмотреть сообщение
I'm using it like this now
PHP код:
new Float:x,Float:y,Float:z;
    if(
newinteriorid == 3)
    {
        
GetPlayerPos(playerid,x,y,z);
    }
    if(
newinteriorid == 0)
    {
        
SetPlayerPos(playerid,x,y,z);
    } 
But, everytime i spawn, i spawn at the 0.0 0.0 0.0 co-ordinates near that farm?
Because x, y, z are being created again when interior changes. Make global player variable for it.
Reply
#7

I'm still exiting on Las Venturas... here's what i've done so far

PHP код:
new
    
Float:IntX[MAX_PLAYERS],
    
Float:IntY[MAX_PLAYERS],
    
Float:IntZ[MAX_PLAYERS];
/////
public OnPlayerInteriorChange(playerid,newinteriorid,oldinteriorid)
{
    if(
oldinteriorid == && newinteriorid == 3)
    {
        
GetPlayerPos(playerid,IntX[playerid],IntY[playerid],IntZ[playerid]);
    }
    if(
oldinteriorid == && newinteriorid == 0)
    {
        
SetPlayerPos(playerid,IntX[playerid],IntY[playerid],IntZ[playerid]);
    }
    return 
1;

Any suggestions?
Reply
#8

Try this one i think it should work.
Код:
 public OnPlayerInteriorChange(playerid,newinteriorid,oldinteriorid) 
{ 
    if(oldinteriorid == 0 && newinteriorid == 3) 
    { 
        new Float:iF[3];
        GetPlayerPos(playerid, iF[0], iF[1], iF[2]);
        SetPVarFloat(playerid, "LSX", iF[0]);
        SetPVarFloat(playerid, "LSY", iF[1]);
        SetPVarFloat(playerid, "LSZ", iF[2]);
        SetPVarInt(playerid, "LSINT", GetPlayerInterior(playerid));
        SetPVarInt(playerid, "LSVW", GetPlayerVirtualWorld(playerid));
    } 
    if(oldinteriorid == 3 && newinteriorid == 0) 
    { 
        SetPlayerPos(playerid,GetPVarFloat(playerid, "LSX"),GetPVarFloat(playerid, "LSY"),GetPVarFloat(playerid, "LSZ")); 
    } 
    return 1; 
}
Test this but i think it should work also you might want to add the VW and Interior
Reply
#9

Thanks for answering, i've tried this, but still on the exit i spawn on Las Venturas.
Reply
#10

Are you sure that is all the code and there's not any other functions which sets you to LV or smth.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)