Streamer_UpdateEx for updating objects? :3
#1

well i heard that if you do Streamer_UpdateEx or Streamer_Update it fixes this porblem :-

when your in a vehicle and going on a map the map goes invisible and u gotta go out and in your car to load the objects..

so how do i exactly use sStreamer_UpdateEx to fix that problem?...
Reply
#2

I want to know that too x) But you must add coordinate in the parameters ... but it's crazy when i must do every coordinate of every object 0_o

pawn Код:
native Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z);
Reply
#3

i have 1965 objects in my drift server and i have to add all co-ordinates :O woah that long..
Reply
#4

Quote:
Originally Posted by [EDT]AmanSingh123
Посмотреть сообщение
i have 1965 objects in my drift server and i have to add all co-ordinates :O woah that long..
Well i have much more objects in my Derby gamemode xD But i don't know if it's the object coordinates 0_o What are those coordinates >_>
Reply
#5

it does say "player id," so it could be player coordinates and probably updates the players objects in stream range?..
Reply
#6

pawn Код:
//Top

forward UpdateMap(playerid, Float:x, Float:y, Float:z);

//Somewhere

public UpdateMap(playerid, Float:x, Float:y, Float:z)
{
    GetPlayerPos(playerid, Float:x, Float:y, Float:z);
    Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z);
}

//Under OnPlayerUpdate
//You can check if the play is in a vehicle here
SetTimer("UpdateMap", 1000, true);
Try that. Dunno if it caouse lag or something, lol.
Reply
#7

Quote:
Originally Posted by Markx
Посмотреть сообщение
pawn Код:
//Top

forward UpdateMap(playerid, Float:x, Float:y, Float:z);

//Somewhere

public UpdateMap(playerid, Float:x, Float:y, Float:z)
{
    GetPlayerPos(playerid, Float:x, Float:y, Float:z);
    Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z);
}

//Under OnPlayerUpdate
//You can check if the play is in a vehicle here
SetTimer("UpdateMap", 1000, true);
Try that. Dunno if it caouse lag or something, lol.

so for the set timer one do i :-

public onPlayerUpdate
{
SetTimer("UpdateMap", 1000, true);
}


or


public onPlayerUpdate
{
SetTimer("UpdateMap", 1000, true);
return 1;
}
Reply
#8

Quote:
Originally Posted by [EDT]AmanSingh123
Посмотреть сообщение
so for the set timer one do it :-

public onPlayerUpdate
{
SetTimer("UpdateMap", 1000, true);
}


or


public onPlayerUpdate
{
SetTimer("UpdateMap", 1000, true);
return 1;
}
Find the "OnPlayerUpdate(playerid)" callback in your script, then add the timer there.
Reply
#9

dont have the OnPlayerUpdate in gamemode :S
Reply
#10

Quote:
Originally Posted by Markx
Посмотреть сообщение
Find the "OnPlayerUpdate(playerid)" callback in your script, then add the timer there.
Seriously, only post when you know what you're talking about. OnPlayerUpdate itself is called about 32 times per second and then you're gonna start new timers in there?! Are you nuts?

As for the Streamer_UpdateEx: It is used to preload objects at a distant location, or to stream them in OnPlayerRequestClass. You use this function in your teleport command, with the location parameters being the same as those the player is being teleported to.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)