本文整理汇总了C++中EventHandler::GetNext方法的典型用法代码示例。如果您正苦于以下问题:C++ EventHandler::GetNext方法的具体用法?C++ EventHandler::GetNext怎么用?C++ EventHandler::GetNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventHandler
的用法示例。
在下文中一共展示了EventHandler::GetNext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnGameModeExit
static cell OnGameModeExit(AMX *amx) {
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
cur->OnGameModeExit();
cur = cur->GetNext();
}
return 1;
}
示例2: OnRconCommand
static cell OnRconCommand(AMX *amx) {
std::string cmd = GetStringFromStack(amx, 0);
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (cur->OnRconCommand(cmd.c_str())) {
return 1;
}
cur = cur->GetNext();
}
return 0;
}
示例3: OnObjectMoved
static cell OnObjectMoved(AMX *amx) {
int objectid = GetCellFromStack(amx, 0);
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (!cur->OnObjectMoved(objectid)) {
return 0;
}
cur = cur->GetNext();
}
return 1;
}
示例4: OnPlayerSpawn
static cell OnPlayerSpawn(AMX *amx) {
int playerid = GetCellFromStack(amx, 0);
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (!cur->OnPlayerSpawn(playerid)) {
return 0;
}
cur = cur->GetNext();
}
return 1;
}
示例5: OnPlayerRequestClass
static cell OnPlayerRequestClass(AMX *amx) {
int playerid = GetCellFromStack(amx, 0);
int classid = GetCellFromStack(amx, 1);
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (!cur->OnPlayerRequestClass(playerid, classid)) {
return 0;
}
cur = cur->GetNext();
}
return 1;
}
示例6: OnPlayerSelectedMenuRow
static cell OnPlayerSelectedMenuRow(AMX *amx) {
int playerid = GetCellFromStack(amx, 0);
int row = GetCellFromStack(amx, 1);
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (!cur->OnPlayerSelectedMenuRow(playerid, row)) {
return 0;
}
cur = cur->GetNext();
}
return 1;
}
示例7: OnVehicleDeath
static cell OnVehicleDeath(AMX *amx) {
int vehicleid = GetCellFromStack(amx, 0);
int killerid = GetCellFromStack(amx, 1);
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (!cur->OnVehicleDeath(vehicleid, killerid)) {
return 0;
}
cur = cur->GetNext();
}
return 1;
}
示例8: OnVehicleStreamOut
static cell OnVehicleStreamOut(AMX *amx) {
int vehicleid = GetCellFromStack(amx, 0);
int forplayerid = GetCellFromStack(amx, 1);
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (!cur->OnVehicleStreamOut(vehicleid, forplayerid)) {
return 0;
}
cur = cur->GetNext();
}
return 1;
}
示例9: OnPlayerDisconnect
static cell OnPlayerDisconnect(AMX *amx) {
int playerid = GetCellFromStack(amx, 0);
int reason = GetCellFromStack(amx, 1);
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (!cur->OnPlayerDisconnect(playerid, reason)) {
return 0;
}
cur = cur->GetNext();
}
return 1;
}
示例10: OnPlayerCommandText
static cell OnPlayerCommandText(AMX *amx) {
int playerid = GetCellFromStack(amx, 0);
std::string cmdtext = GetStringFromStack(amx, 1);
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (cur->OnPlayerCommandText(playerid, cmdtext.c_str())) {
return 1;
}
cur = cur->GetNext();
}
return 0;
}
示例11: OnVehicleDamageStatusUpdate
static cell OnVehicleDamageStatusUpdate(AMX *amx) {
int vehicleid = GetCellFromStack(amx, 0);
int playerid = GetCellFromStack(amx, 1);
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (!cur->OnVehicleDamageStatusUpdate(vehicleid, playerid)) {
return 0;
}
cur = cur->GetNext();
}
return 1;
}
示例12: OnPlayerClickPlayer
static cell AMXAPI OnPlayerClickPlayer(AMX *amx) {
int playerid = GetCellFromStack(amx, 0);
int clickedplayerid = GetCellFromStack(amx, 1);
int source = GetCellFromStack(amx, 2);
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (!cur->OnPlayerClickPlayer(playerid, clickedplayerid, source)) {
return 0;
}
cur = cur->GetNext();
}
return 1;
}
示例13: OnRconLoginAttempt
static cell OnRconLoginAttempt(AMX *amx) {
std::string ip = GetStringFromStack(amx, 0);
std::string password = GetStringFromStack(amx, 1);
bool success = GetCellFromStack(amx, 2) != 0;
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (cur->OnRconLoginAttempt(ip.c_str(), password.c_str(), success)) {
return 1;
}
cur = cur->GetNext();
}
return 0;
}
示例14: OnPlayerEnterVehicle
static cell OnPlayerEnterVehicle(AMX *amx) {
int playerid = GetCellFromStack(amx, 0);
int vehicleid = GetCellFromStack(amx, 1);
bool ispassenger = GetCellFromStack(amx, 2) != 0;
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (!cur->OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)) {
return 0;
}
cur = cur->GetNext();
}
return 1;
}
示例15: OnPlayerKeyStateChange
static cell OnPlayerKeyStateChange(AMX *amx) {
int playerid = GetCellFromStack(amx, 0);
int newkeys = GetCellFromStack(amx, 1);
int oldkeys = GetCellFromStack(amx, 2);
EventHandler *cur = EventHandler::GetFirstEventHandler();
while (cur != 0) {
if (!cur->OnPlayerKeyStateChange(playerid, newkeys, oldkeys)) {
return 0;
}
cur = cur->GetNext();
}
return 1;
}