Is it possible removing enter/exit pickups -
Escobabe - 06.11.2017
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.
Re: Is it possible removing enter/exit pickups -
StrikerZ - 06.11.2017
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
Re: Is it possible removing enter/exit pickups -
Escobabe - 06.11.2017
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.
Re: Is it possible removing enter/exit pickups -
StrikerZ - 06.11.2017
Save and set player pos on this callback - OnInteriorChange
Re: Is it possible removing enter/exit pickups -
Escobabe - 06.11.2017
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?
Re: Is it possible removing enter/exit pickups -
StrikerZ - 06.11.2017
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.
Re: Is it possible removing enter/exit pickups -
Escobabe - 06.11.2017
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 == 0 && newinteriorid == 3)
{
GetPlayerPos(playerid,IntX[playerid],IntY[playerid],IntZ[playerid]);
}
if(oldinteriorid == 3 && newinteriorid == 0)
{
SetPlayerPos(playerid,IntX[playerid],IntY[playerid],IntZ[playerid]);
}
return 1;
}
Any suggestions?
Re: Is it possible removing enter/exit pickups -
LazzyBoy - 06.11.2017
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
Re: Is it possible removing enter/exit pickups -
Escobabe - 06.11.2017
Thanks for answering, i've tried this, but still on the exit i spawn on Las Venturas.
Re: Is it possible removing enter/exit pickups -
LazzyBoy - 06.11.2017
Are you sure that is all the code and there's not any other functions which sets you to LV or smth.