Add change_level() native.
This commit is contained in:
@ -654,7 +654,7 @@ public cmdSlap(id, level, cid)
|
||||
|
||||
public chMap(map[])
|
||||
{
|
||||
server_cmd("changelevel %s", map)
|
||||
change_level(map);
|
||||
}
|
||||
|
||||
public cmdMap(id, level, cid)
|
||||
|
@ -84,6 +84,19 @@ native precache_sound(const name[]);
|
||||
/* Precaches any file. */
|
||||
native precache_generic(const szFile[]);
|
||||
|
||||
/**
|
||||
* Changes map.
|
||||
*
|
||||
* @note This calls the pfnChangelLevel engine function.
|
||||
* @note This has the same behavior as calling "changelevel" server command,
|
||||
* but this will trigger properly server_changelevel() forward.
|
||||
*
|
||||
* @aparam map The map name to change.
|
||||
*
|
||||
* @noreturn
|
||||
*/
|
||||
native change_level(const map[]);
|
||||
|
||||
/* Sets info for player. */
|
||||
native set_user_info(index,const info[],const value[]);
|
||||
|
||||
|
@ -321,7 +321,7 @@ public cmdMapsMenu(id, level, cid)
|
||||
}
|
||||
|
||||
public delayedChange(mapname[])
|
||||
server_cmd("changelevel %s", mapname)
|
||||
change_level(mapname)
|
||||
|
||||
public actionVoteMapMenu(id, key)
|
||||
{
|
||||
|
@ -118,7 +118,7 @@ public delayedChange(param[])
|
||||
if (g_mp_chattime) {
|
||||
set_pcvar_float(g_mp_chattime, get_pcvar_float(g_mp_chattime) - 2.0)
|
||||
}
|
||||
server_cmd("changelevel %s", param)
|
||||
change_level(param)
|
||||
}
|
||||
|
||||
public changeMap()
|
||||
|
Reference in New Issue
Block a user