Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- // Author: iPLEOMAX, 2012
- #if defined _multicmd_included
- #endinput
- #endif
- #define _multicmd_included
- #include <a_samp>
- new
- iStartMCMD = -1,
- iCommandMCMD[128]
- ;
- /*
- native MultiCommand(playerid, Commands[]);
- */
- stock MultiCommand( playerid, Commands[] )
- {
- iStartMCMD = -1;
- iCommandMCMD[0] = EOS;
- for ( new iPos, iLen = strlen(Commands); iPos <= iLen; iPos++ )
- {
- if ( Commands[iPos] == '/' || iPos == iLen )
- {
- switch(iStartMCMD)
- {
- case -1: iStartMCMD = iPos;
- default:
- {
- strmid(iCommandMCMD, Commands, iStartMCMD, iPos);
- CallLocalFunction( "OnPlayerCommandText", "is", playerid, iCommandMCMD);
- iStartMCMD = iPos;
- }
- }
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment