Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- @Creator: DraKiNs
- @Project: ReturnParam
- @Date: 27/06/2011
- @Site: www.ips-team.blogspot.com
- */
- //=========== [ Command ] =======================================
- if(!strcmp(cmdtext, "/me", true, 3)) // 3 = lenght of /me
- {
- static
- sStr[128]
- ;
- GetPlayerName(playerid, sStr, MAX_PLAYER_NAME);
- format(sStr, 128, "%s[%i]: %s",sStr, playerid, ReturnParam(cmdtext, 1));
- return SendClientMessageToAll(0xFFFFFFFF, sStr);
- }
- //=========== [ Function ] =======================================
- ReturnParam(cmdtext[], param)
- {
- #if !defined MAX_STRING
- #define MAX_STRING 128
- #endif
- new
- i,
- spaces,
- string[MAX_STRING],
- ;
- for( ; spaces != param; ++i)
- {
- if(!(cmdtext[i] == 0x20)) continue;
- spaces++;
- }
- return strcat(string,cmdtext[i], MAX_STRING), cmdtext[i] = EOS, string;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement