[Tutorial] Como Criar o comando "/asay"
#10

Quote:
Originally Posted by fxckshzt
Посмотреть сообщение
..
Minha sugestгo...

PHP код:
CMD:asay(playeridparams[])
{
    
//como o parametro й sу texto, use a propiб variбvel do zcmd!
    
if(isnull(param)) return SendClientMessage(playerid, -1,"[CORRETOR]: Use /asay [texto]");
    
    if(
IsPlayerAdmin(playerid))  //se for admin [trocar pelo seu sistema admin ou vip]
        
SendClientMessageToAllf(-1"[GLOBAL ADMINISTRAЗГO]: %s - %s"GetPlayerNameEx(playerid), param);
    else                                
//player normal
        
SendClientMessageToAllf(-1"[GLOBAL MESSENGER]: %s - %s"GetPlayerNameEx(playerid), param);
    return 
1;

Inclusхes:
PHP код:
//-------------------------------------------------------------------------------------------------------------------
//SendClientMessageToAllf eu aconcelho usar o do Plugin YSF, porque й mais rapido!
//mas tambem tem este macro:
static str[128];
#define SendClientMessagef(%0,%1,%2,%3) format(str, sizeof(str),%2,%3) && SendClientMessage(%0, %1, str)
#define SendClientMessageToAllf(%1,%2,%3) format(str, sizeof(str),%2,%3) && SendClientMessageToAll(%1, str)
//-------------------------------------------------------------------------------------------------------------------
stock GetPlayerNameEx(playerid)
{
    new 
nome[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnomeMAX_PLAYER_NAME);
    return 
nome;
}
//------------------------------------------------------------------------------------------------------------------- 
Reply


Messages In This Thread
Como Criar o comando "/asay" - by fxckshzt - 19.08.2017, 23:52
Re: Como Criar o comando "/asay" - by C4rtm4n - 19.08.2017, 23:55
Re: Como Criar o comando "/asay" - by fxckshzt - 20.08.2017, 00:24
Re: Como Criar o comando "/asay" - by C4rtm4n - 20.08.2017, 00:39
Re: Como Criar o comando "/asay" - by fxckshzt - 20.08.2017, 00:42
Re: Como Criar o comando "/asay" - by GuilhermeNunes - 20.08.2017, 00:48
Re: Como Criar o comando "/asay" - by fxckshzt - 20.08.2017, 01:03
Re: Como Criar o comando "/asay" - by Jonorusc - 20.08.2017, 01:13
Re: Como Criar o comando "/asay" - by fxckshzt - 20.08.2017, 01:26
aqui vai meu exemplo, mais compacto! e simples! - by RazorGuigo - 06.09.2017, 13:38

Forum Jump:


Users browsing this thread: 2 Guest(s)