SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 30/11/2018, 09:36 PM   #1
GuiKommander
Gangsta
 
GuiKommander's Avatar
 
Join Date: Dec 2016
Posts: 749
Reputation: 17
Default Duvida

Como é para executar um Comando Já feito em uma parte do código?

Eu tentei dessa forma (lembrando eu uso ZCMD)

PHP Code:
cmd_minhaempresa(playeridparams[]); 
GuiKommander is offline   Reply With Quote
Old 30/11/2018, 09:38 PM   #2
Locky_
High-roller
 
Locky_'s Avatar
 
Join Date: Jul 2012
Posts: 1,607
Reputation: 321
Default Re: Duvida

Seu comando
pawn Code:
CMD:exemplo(playerid, params[])
{
     return printf("%i usou /exemplo %s", playerid, params);
}

Onde deseja chamar o comando em algum trecho de seu script

pawn Code:
cmd_exemplo(playerid, "");


Caso não utilize parametros em seu comando

pawn Code:
CMD:exemplo2(playerid)
{
    return printf("%i usou /exemplo2", playerid);
}

// No trecho de seu script onde desejar chamar o cmd
cmd_exemplo2(playerid);

Há também outras formas.

pawn Code:
CallLocalFunction("cmd_exemplo2", "d", playerid);
Locky_ is offline   Reply With Quote
Old 30/11/2018, 10:43 PM   #3
willttoonn
Gangsta
 
willttoonn's Avatar
 
Join Date: Nov 2011
Location: Brazil
Posts: 821
Reputation: 54
Default Re: Duvida

Se for usando o ZCMD:
pawn Code:
cmd_COMANDO(playerid, "\1");
__________________
Wil
Sometimes a captain has to make the unpopular call because that's his responsibility

/WiltonFreitas willttoonn Wil#3638

Advanced Roleplay
Staff — Management
Development Team — Head Developer
willttoonn is offline   Reply With Quote
Old 30/11/2018, 10:45 PM   #4
GuiKommander
Gangsta
 
GuiKommander's Avatar
 
Join Date: Dec 2016
Posts: 749
Reputation: 17
Default Re: Duvida

Valeu pessoal :3
GuiKommander is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[duvida] tira minha duvida aqui felipe_mr Português/Portuguese 1 07/01/2012 04:02 PM
[Dúvida/Ajuda] Dúvida besta e significativa para mim :) Kuddy Português/Portuguese 21 25/08/2011 08:37 PM
[DUVIDA]Qual a diferença ZCMD, DCMD, e cmd Normal[DUVIDA] Dj_Paradox Português/Portuguese 3 21/02/2011 10:05 PM
[DUVIDA]Uma Duvida Só Ajuda Aqui Pf .. duany123 Português/Portuguese 3 25/08/2010 06:53 PM
[Duvida]Duvida No Script Aadmin andersongr98 Português/Portuguese 8 08/07/2010 12:56 AM


All times are GMT. The time now is 04:37 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.