strcmp:
pawn Код:
stock ForcarComando(playerid, cmdtext[])
{
CallRemoteFunction("OnPlayerCommandText", "ds", playerid, cmdtext);
return true;
}
Exemplo do uso:
pawn Код:
ForcarComando(playerid, "/admins");//Forзarб o jogador б usar o comando /admins assim que ele entrar
zcmd
pawn Код:
CMD:comandoid( p, pr[], PlayerID, cmdtext[ 30 ] )
{
if( sscanf( pr, "us[25]", PlayerID, cmdtext ) ) return SendClientMessage( p, -1, #Use /comandoid [ID] );
return OnPlayerCommandReceived( PlayerID, cmdtext ), true;
}
Crйditos: JonathanFeitosa & iShock