Fun: различия между версиями
Kissbb (обсуждение | вклад) м (Полностью удалено содержимое страницы) |
Nikita (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
+ | == fun.inc == | ||
+ | === get_client_listen === | ||
+ | Returns 1 if receiver hears sender via voice communication. | ||
+ | native get_client_listen(receiver, sender); | ||
+ | |||
+ | === set_client_listen === | ||
+ | Sets who can listen who. Function returns 0 if for some reasons this setting can't be done. | ||
+ | native set_client_listen(receiver, sender, listen); | ||
+ | |||
+ | === set_user_godmode === | ||
+ | Задает игроку режим бога. | ||
+ | Для того, чтобы отключить режим бога, нужно указать только первый параметр. | ||
+ | native set_user_godmode(index, godmode = 0); | ||
+ | |||
+ | === get_user_godmode === | ||
+ | Returns 1 if godmode is set. | ||
+ | native get_user_godmode(index); | ||
+ | |||
+ | === set_user_armor === | ||
+ | Задает игроку броню | ||
+ | native set_user_armor(index, armor); | ||
+ | |||
+ | === native set_user_health === | ||
+ | Задает здоровье игроку | ||
+ | native set_user_health(index, health); | ||
+ | |||
+ | === set_user_origin === | ||
+ | Перемещает игрока в заданную координату | ||
+ | native set_user_origin(index, const origin[3]); | ||
+ | |||
+ | === set_user_rendering === | ||
+ | Sets player rendering mode. | ||
+ | native set_user_rendering(index, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16); | ||
+ | |||
+ | === give_item === | ||
+ | Gives item to player, name of item can start with weapon_, ammo_ and item_. This event is announced with proper message to all players. | ||
+ | native give_item(index, const item[]); | ||
+ | |||
+ | === set_user_hitzones === | ||
+ | Sets hit zones for player. | ||
+ | |||
+ | native set_user_hitzones(index = 0, target = 0, body = 255); | ||
+ | |||
+ | Parts of body are as bits:<br /> | ||
+ | 1 - generic<br /> | ||
+ | 2 - head<br /> | ||
+ | 4 - chest<br /> | ||
+ | 8 - stomach<br /> | ||
+ | 16 - left arm<br /> | ||
+ | 32 - right arm<br /> | ||
+ | 64 - left leg<br /> | ||
+ | 128 - right leg<br /> | ||
+ | |||
+ | === get_user_hitzones === | ||
+ | Get user hitzones. | ||
+ | native get_user_hitzones(index, target); | ||
+ | |||
+ | === set_user_maxspeed === | ||
+ | Sets users max. speed. | ||
+ | native set_user_maxspeed(index, Float:speed = -1.0); | ||
+ | |||
+ | === get_user_maxspeed === | ||
+ | Returns users max. speed. | ||
+ | native Float:get_user_maxspeed(index); | ||
+ | |||
+ | === set_user_gravity === | ||
+ | Sets users gravity. | ||
+ | native set_user_gravity(index, Float:gravity = 1.0); | ||
+ | |||
+ | === get_user_gravity === | ||
+ | /* Returns users gravity. */ | ||
+ | native Float:get_user_gravity(index); | ||
+ | |||
+ | === spawn === | ||
+ | /* Spawns entity. */ | ||
+ | native spawn(index); | ||
+ | |||
+ | === set_user_noclip === | ||
+ | Sets player noclip. If you want to disable noclip set only first parameter. | ||
+ | native set_user_noclip(index, noclip = 0); | ||
+ | |||
+ | === get_user_noclip === | ||
+ | Returns 1 if noclip is set. | ||
+ | native get_user_noclip(index); | ||
+ | |||
+ | === get_user_footsteps === | ||
+ | Returns 1 if player has silent footsteps, 0 if footsteps are set to normal | ||
+ | native get_user_footsteps(index); | ||
+ | |||
+ | === set_user_footsteps === | ||
+ | /* Gives player silent footsteps. | ||
+ | * if set = 0 it will return footsteps to normal */ | ||
+ | native set_user_footsteps(id, set = 1); | ||
+ | |||
+ | === strip_user_weapons === | ||
+ | /* Strips all weapons from user. */ | ||
+ | native strip_user_weapons(index); | ||
+ | |||
+ | === set_user_frags === | ||
+ | /* Sets player frags. */ | ||
+ | native set_user_frags(index, frags); |
Версия 11:31, 14 июня 2013
Содержание
- 1 fun.inc
- 1.1 get_client_listen
- 1.2 set_client_listen
- 1.3 set_user_godmode
- 1.4 get_user_godmode
- 1.5 set_user_armor
- 1.6 native set_user_health
- 1.7 set_user_origin
- 1.8 set_user_rendering
- 1.9 give_item
- 1.10 set_user_hitzones
- 1.11 get_user_hitzones
- 1.12 set_user_maxspeed
- 1.13 get_user_maxspeed
- 1.14 set_user_gravity
- 1.15 get_user_gravity
- 1.16 spawn
- 1.17 set_user_noclip
- 1.18 get_user_noclip
- 1.19 get_user_footsteps
- 1.20 set_user_footsteps
- 1.21 strip_user_weapons
- 1.22 set_user_frags
fun.inc
get_client_listen
Returns 1 if receiver hears sender via voice communication.
native get_client_listen(receiver, sender);
set_client_listen
Sets who can listen who. Function returns 0 if for some reasons this setting can't be done.
native set_client_listen(receiver, sender, listen);
set_user_godmode
Задает игроку режим бога. Для того, чтобы отключить режим бога, нужно указать только первый параметр.
native set_user_godmode(index, godmode = 0);
get_user_godmode
Returns 1 if godmode is set.
native get_user_godmode(index);
set_user_armor
Задает игроку броню
native set_user_armor(index, armor);
native set_user_health
Задает здоровье игроку
native set_user_health(index, health);
set_user_origin
Перемещает игрока в заданную координату
native set_user_origin(index, const origin[3]);
set_user_rendering
Sets player rendering mode.
native set_user_rendering(index, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16);
give_item
Gives item to player, name of item can start with weapon_, ammo_ and item_. This event is announced with proper message to all players.
native give_item(index, const item[]);
set_user_hitzones
Sets hit zones for player.
native set_user_hitzones(index = 0, target = 0, body = 255);
Parts of body are as bits:
1 - generic
2 - head
4 - chest
8 - stomach
16 - left arm
32 - right arm
64 - left leg
128 - right leg
get_user_hitzones
Get user hitzones.
native get_user_hitzones(index, target);
set_user_maxspeed
Sets users max. speed.
native set_user_maxspeed(index, Float:speed = -1.0);
get_user_maxspeed
Returns users max. speed.
native Float:get_user_maxspeed(index);
set_user_gravity
Sets users gravity. native set_user_gravity(index, Float:gravity = 1.0);
get_user_gravity
/* Returns users gravity. */
native Float:get_user_gravity(index);
spawn
/* Spawns entity. */
native spawn(index);
set_user_noclip
Sets player noclip. If you want to disable noclip set only first parameter.
native set_user_noclip(index, noclip = 0);
get_user_noclip
Returns 1 if noclip is set.
native get_user_noclip(index);
get_user_footsteps
Returns 1 if player has silent footsteps, 0 if footsteps are set to normal
native get_user_footsteps(index);
set_user_footsteps
/* Gives player silent footsteps.
- if set = 0 it will return footsteps to normal */
native set_user_footsteps(id, set = 1);
strip_user_weapons
/* Strips all weapons from user. */ native strip_user_weapons(index);
set_user_frags
/* Sets player frags. */ native set_user_frags(index, frags);