Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock cmdparam(string[]) // version 2
- {
- #define MAX_PARAM_LEN 24 // Valid only to parameters it cuts, meaning all except the last one e.g. </pay[24]> <ID[24]> <money[128]>
- new first[MAX_PARAM_LEN] = "-1";
- if(!string[0]) return first;
- new space = strfind(string, " ");
- if(space == -1)
- {
- format(first, MAX_PARAM_LEN, string);
- string[0] = 0;
- }
- else
- {
- strmid(first, string, 0, space, MAX_PARAM_LEN);
- strdel(string, 0, space + 1);
- }
- return first;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement