10.10.2015, 08:48
Nice.
Is it possible to not upgrade objects near the player under certain conditions? Something like returning 0 in OnPlayerUpdate
|
Streamer_ToggleItemUpdate(playerid, type, toggle)
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_OBJECT, 0);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_PICKUP, 0);
And the bug is? I use this quite a bit with teleporting on my server and i have no issue. Just remember that 0 (false) means it would disable streaming of the the item type but any items that are streamed in will stay shown and 0 (true) would re-enable item streaming.
|
Streamer_ToggleAllItemUpdate(playerid, toggle)
{
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_OBJECT, toggle);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_PICKUP, toggle);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_MAP_ICON, toggle);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_3D_TEXT_LABEL, toggle);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_AREA, toggle);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_CP, toggle);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_RACE_CP, toggle);
return 1;
}
https://www.youtube.com/watch?v=4nAkcGDJbT0
PHP код:
|
Streamer_ToggleAllItemUpdate(playerid, toggle)
{
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_OBJECT, toggle);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_PICKUP, toggle);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_MAP_ICON, toggle);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_3D_TEXT_LABEL, toggle);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_AREA, toggle);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_CP, toggle);
Streamer_ToggleItemUpdate(playerid, STREAMER_TYPE_RACE_CP, toggle);
return 1;
}
CMD:strue(playerid,params[]) //re-enables the item update
{
return Streamer_ToggleAllItemUpdate(playerid, true);
}
CMD:sfalse(playerid,params[]) //disables the item update
{
return Streamer_ToggleAllItemUpdate(playerid, false);
}
[21:54:09] Loading plugin: streamer [21:54:09] [debug] Server crashed due to an unknown error [21:54:10] [debug] Native backtrace: [21:54:10] [debug] #0 019f485e in ?? () from D:\Documents and Settings\Илья\Рабочий стол\БЭКАПЫ\Апокалипсис\new\plugins\streamer.dll [21:54:10] [debug] #1 019f3770 in ?? () from D:\Documents and Settings\Илья\Рабочий стол\БЭКАПЫ\Апокалипсис\new\plugins\streamer.dll [21:54:10] [debug] #2 01a04d43 in Load () from D:\Documents and Settings\Илья\Рабочий стол\БЭКАПЫ\Апокалипсис\new\plugins\streamer.dll [21:54:10] [debug] #3 0046a51b in ?? () from D:\Documents and Settings\Илья\Рабочий стол\БЭКАПЫ\Апокалипсис\new\samp-server.exe [21:54:10] [debug] #4 00c50178 in ?? ()