SA-MP Forums Archive
[Pedido] Forзar comando - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Forзar comando (/showthread.php?tid=420992)



Forзar comando - JowSmith - 07.03.2013

Queria um cmd paara admin 3001 exemplo /forзarcomando [id] [comando] aн foce como o cara desse o comando..


Re: Forзar comando - Schocc - 07.03.2013

vo te dar um Exemplo:
pawn Код:
YCMD:fcomando( p, pr[], h )
{
    new
        cmdtext[ 31 ],
        PlayerID
    ;
    sscanf( pr, "us[25]", PlayerID, cmdtext );
    return OnPlayerCommandReceived( PlayerID, cmdtext ), true;
}



Re: Forзar comando - Don_Speed - 07.03.2013

pawn Код:
cmd_comando(id,params[])



Re: Forзar comando - JowSmith - 07.03.2013

Explica aew :d


Re: Forзar comando - VenoN - 07.03.2013

Quote:
Originally Posted by JowSmith
Посмотреть сообщение
Explica aew :d
explique vc que processador de comandos vc usa?


Re: Forзar comando - Don_Speed - 07.03.2013

Quote:
Originally Posted by Don_Speed
Посмотреть сообщение
pawn Код:
cmd_comando(id,params[])
Quote:
Originally Posted by JowSmith
Посмотреть сообщение
Explica aew :d
Usei zcmd .

comando qual e o comando em questгo que estarб sendo forзado.
ID , jogador que sarб forзado.




Re: Forзar comando - JowSmith - 07.03.2013

sou meio noob nisso, tipo, eu boto aonde? Й sу isso?


Re: Forзar comando - Schocc - 07.03.2013

em zcmd:
pawn Код:
// Em zcmd
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;
}

//Em YCMD
YCMD:fcomando( p, pr[], h )
{
    new
        cmdtext[ 31 ],
        PlayerID
    ;
    sscanf( pr, "us[25]", PlayerID, cmdtext );
    return OnPlayerCommandReceived( PlayerID, cmdtext ), true;
}