07.03.2012, 14:24
pawn Код:
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;
}
pawn Код:
F:\My favorite sa-mp script\filterscripts\Multi.pwn(1) : error 010: invalid function or declaration
F:\My favorite sa-mp script\filterscripts\Multi.pwn(2) : error 013: no entry point (no public functions)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.