27.01.2014, 03:16
Very Nice!
// Called when a player falls from a tall height.
forward OnPlayerFall(playerid, Float:height, Float:damage);
// Called when a player crashes their vehicle.
forward OnPlayerCrashVehicle(playerid, vehicleid);
// Called when a player crashes their vehicle.
forward OnPlayerCrashVehicle(playerid, vehicleid, Float:damage);
Except no-one ever says "PRESSED(keys) && HOLDING(keys)", plus all the macros should be in an include anyway.
|
Another great release EMMAAT. I'm expecting this include to have more cool features and I can assure that it would get updated with useful callbacks.
Btw, the pausing system's timer is being called every 600ms and detects if OPU is called or not. From my experience, OPU might get paused when a player is entering a vehicle, or is at dead state. It would be good if OPU is set to true under OnPlayerStateChange too. Sorry if I'm wrong, but I've experienced such things with 0.3x R1. |
Damn looks lovely Emmet! Another cool release from you. Loved the callbacks. It will more helpful for all the Roleplay servers. I will use them for sure!
pawn Код:
pawn Код:
|
Updates: - Added "OnPlayerUseVending" - called when a player uses a vending machine. - OnPlayerCrashVehicle now has a damage parameter ("Float:damage"). - Fixed the pause detector, it should be much more accurate now.
Thanks, everyone.
Код:
Updates: - Added OnPlayerFPSChange(playerid, oldfps, newfps). - Added a USE_OPTIMAL_MODE setting. - Added GetPlayerFPS(playerid). - Fixed a bug where OnPlayerCrashVehicle was sometimes called twice. - Memory and performance improvements! pawn Код:
|
public OnPlayerFPSChange(playerid, oldfps, newfps)
{
static
str[24]
;
format(str, 24, "~r~FPS:~w~ %d", newfps);
PlayerTextDrawSetString(playerid, g_FPSTextdraw[playerid], str);
return 1;
}
CMD:laggers(playerid, params[])
{
static
str[1024],
name[MAX_PLAYER_NAME]
;
foreach (new i : Player)
{
if (GetPlayerFPS(i) < 30)
{
GetPlayerName(i, name, sizeof(name));
format(str, sizeof(str), "%s%s (%d FPS)\n", str, name, GetPlayerFPS(i));
}
}
return ShowPlayerDialog(playerid, DIALOG_LAGGERS, DIALOG_STYLE_LIST, "List of Laggers", str, "Close", "");
}
warning 235: public function lacks forward declaration (symbol "CB_OnPlayerUpdate")
YSI and Emmet_ callbacks
Код:
warning 235: public function lacks forward declaration (symbol "CB_OnPlayerUpdate") |
IsPlayerNearVending might not detect some vending machines. There were a few threads with positions for vending machines and some vending machines were missing (the ones inside 24/7 stores). I tested this like a year ago with data from other threads and all of them had some vending machine positions missing.
Support for y_timers would also be nice. |
native GetServerIP();