![]() |
|
||||||||
Useful functionshome / Knowledge Base / Coding / Useful functionsObtaining player's IP address
PlayerIP = Player.GetPlayerNetworkAddress(); The first line gets your IP and port (e.g. 213.170.168.2:4000, where 213.170.168.2 is a IP and 4000 is a port) and the second line filters port leaving only an IP address. Recognising maps
if (Level.NetMode != NM_Standalone) Recognising custom parameters
If you're planning to make functions of your mutator recognise user typed string, like, for example, user ID on the server (MMSwitcher), that's how you can do it:
function Mutate (String S, PlayerPawn Player) Switching teams
The essence of MMSwitcher — the code of switching player's team without killing him or her and with updating his or her user.ini. Team IDs:
local pawn victim; Spawning
That's how we can find a suitable for spawning spawn point (thanks to Nobody for the code):
local navigationpoint navpoint; Managing augmentations
If you want to delete all augs of a player and to add a specific one, that's how you can do it:
local augmentation aug; Written by Daedalus and Alex. | |||||||||
![]() © dxalpha.com, 2003—2007. |
|||||||||