[FilterScript] MFAdmin 1.0
#3

Quote:
Originally Posted by PT
Посмотреть сообщение
Й uma pena voce nao otimizar mais isso ai exemplo:

pawn Код:
YCMD:a(playerid, params[], help)
{
    if(PlayerInfo[playerid][Admin] < 1)
        return SendClientMessage(playerid, -1, "Vocк nгo tem permiзгo para usar esse comando!");
    extract params -> new string:msg[100]; else
    {
        return SendClientMessage(playerid, -1, "Utilize /a [MENSSAGEM]");
    }
    new string[128];
    format(string, sizeof(string), "Admin %s: %s", PlayerName(playerid), msg);
    AdminChat(playerid, ROSA,string);
    return 1;
}
ou se quiser mais simples:

pawn Код:
YCMD:a(playerid, params[], help)
{
    if(PlayerInfo[playerid][Admin] < 1)
        return SendClientMessage(playerid, -1, "Vocк nгo tem permiзгo para usar esse comando!");
    new msg[100];
    if(sscanf(params, "s[100]", msg))
        return SendClientMessage(playerid, -1, "Utilize /a [MENSSAGEM]");
    new string[128];
    format(string, sizeof(string), "Admin %s: %s", PlayerName(playerid), msg);
    AdminChat(playerid, ROSA,string);
    return 1;
}
# Vale lembrar que so funciona na versao sscanf que usa plugin.

Й uma forma diferente de usar sscanf a 1є forma :P
cumps.
Entendi, irei melhorar o cуdigo na versгo 1.1. Obrigado.
Reply


Messages In This Thread
MFAdmin 1.1 - by Mandrack_FreeZe - 25.09.2014, 19:43
Re: MFAdmin 1.0 - by PT - 25.09.2014, 20:04
Re: MFAdmin 1.0 - by Mandrack_FreeZe - 25.09.2014, 20:08
Re: MFAdmin 1.0 - by ProKillerpa - 25.09.2014, 23:04
Re: MFAdmin 1.0 - by iFox - 26.09.2014, 02:03
Re: MFAdmin 1.0 - by DannielCooper - 26.09.2014, 04:00
Re: MFAdmin 1.0 - by Mandrack_FreeZe - 26.09.2014, 15:28
Re: MFAdmin 1.0 - by Mandrack_FreeZe - 27.09.2014, 18:05
Re: MFAdmin 1.0 - by PT - 29.09.2014, 15:03
Re: MFAdmin 1.0 - by RiqueP - 29.09.2014, 16:24
Re: MFAdmin 1.0 - by ReyMysterio - 29.09.2014, 16:52
Re: MFAdmin 1.0 - by Mandrack_FreeZe - 30.09.2014, 15:27

Forum Jump:


Users browsing this thread: 1 Guest(s)