GetTok
From Liberty Unleashed Wiki
This function get one word from the string provided (e.g: Hi, i'm a string)
Syntax
GetTok ( parameter szParams, string ToJump, int Number )
Example
This example tells the player the toks "Hi," and "string!"
function onPlayerCommand ( pPlayer, szCommand, szParams ) { switch ( szCommand ) { case "toks": { local String = "Hi, i'ma a string! :D"; local One = GetTok ( String, " ", 1 ); // Get "Hi," local Two = GetTok ( String, " ", 4 ); // Get "string!" MessagePlayer ( One + Two, pPlayer ); } } }
Notes
The function MessagePlayer and call onPlayerCommand were used in this example. More info about them in corresponding pages.