OnEnterExit
#1

Hello i am using iee (interiorEnterExit) and face a problem ones i go to interior i fall of because objects are not loaded yet , so now i think i should freeze player for a sec or two till everything are loaded , but i do not really know where to call a timer i mean if there are callback like OnplayerEnterExit ? or how can i check if player are used enterexit pickup ?
Reply
#2

Hello.

When the player enter the interior (when he press a key or type a command) then you freeze the player and start a timer which the interval 400-600.

If you don't know what I mean you can send us the code which will call when you enter a interior or what cause that you enter a interior.
Reply
#3

i sow call back OnPlayerInteriorChange if u mean that , but my most interiors are on InteriorID 0 so i dont think that will work and dont get what did u mean by this "when he press a key or type a command" IEE doent need to type comand or press a key this is not even a pickup i guess , because if that would be pick up i could use on player enter a pick up , fix me if i am wrong
Reply
#4

i have tried this but thats no use no effect at all
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	if(pickupid == 19198){
	    GameTextForPlayer(playerid,"~w~TESTTTTT",3000,3);
	    TogglePlayerControllable(playerid, 0);
    	    SetTimerEx("UnfreezePlayer", 1000, false, "i", playerid);
	}

	
	return 1;
}
any other advice ?
Reply
#5

All original interiors excluding "Dillimore Gas Station" do have an interiorid not equal to 0. That being said, you most likely have custom interiors so yes, you will need to freeze the player so the objects can load.
In case you use streamer, you can also update a position before actually setting the player's position there with Streamer_UpdateEx function.

Yellow arrows are pickups but they do not trigger OnPlayerPickUpPickup unless you disable enter/exit and create them yourself (that's what most people tend to do).
Reply
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
All original interiors excluding "Dillimore Gas Station" do have an interiorid not equal to 0. That being said, you most likely have custom interiors so yes, you will need to freeze the player so the objects can load.
In case you use streamer, you can also update a position before actually setting the player's position there with Streamer_UpdateEx function.

Yellow arrows are pickups but they do not trigger OnPlayerPickUpPickup unless you disable enter/exit and create them yourself (that's what most people tend to do).
yes i am using steamer and dynamic objects , but witch of those solution would be better to update steamer before moving or disable enter exit and make them manually ? and where should i call Steamer_UpdateEx ?
Reply
#7

Yes, you fall because objects don't load on your client. That doesn't mean that others suffer the same problem. I find freeze timers so incredibly annoying. You're sitting there waiting for the objects to supposedly load when they already have. If you implement such system, provide an option to turn it OFF. You may want to base the interval on the player's ping, times 5. So someone with a good connection and 30ms ping will only have to wait 150 ms and someone with 400 ping will have to wait 2 seconds.
Reply
#8

Quote:
Originally Posted by Vince
Посмотреть сообщение
Yes, you fall because objects don't load on your client. That doesn't mean that others suffer the same problem. I find freeze timers so incredibly annoying. You're sitting there waiting for the objects to supposedly load when they already have. If you implement such system, provide an option to turn it OFF. You may want to base the interval on the player's ping, times 5. So someone with a good connection and 30ms ping will only have to wait 150 ms and someone with 400 ping will have to wait 2 seconds.
yes but where call timer ? i mean yes if i disable enter/exits and make them by myself then i can use timer onplayerpickuppickup , but if i am not disabling them then i cant call a timer there , and do not know where , as Konstantinos mentionet "Streamer_UpdateEx" function , but again i am not really familiar with that , do not know if this is the best solution and how to use it where to call

And my ping are 3-5 cuz i am on a local server with a fast internet connection 100mbps so my internet are fast and i am still not able to load them and fall with a low ping
Reply
#9

Disable enter/exit and create your own pickups to enter the interiors (original or custom). After done that, post the part that teleports the player to the interior and perhaps some coordinates so we can understand whether we are talking about the original interiors or interiors with created objects through the script and whether they are dynamic or not.
Reply
#10

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Disable enter/exit and create your own pickups to enter the interiors (original or custom). After done that, post the part that teleports the player to the interior and perhaps some coordinates so we can understand whether we are talking about the original interiors or interiors with created objects through the script and whether they are dynamic or not.
all interiors i have now are custom made by me , so if u tell then the best solution is to disable iee and make my own pickups and teleports right ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)