[Ajuda] ajuda /cnn
#1

eu tenho o /cnn
pawn Код:
CMD:cnn(playerid, params[])
{
if(PlayerInfo[playerid][pAdministrador] < 1 && PlayerInfo[playerid][pMonitor] < 1 && PlayerInfo[playerid][pFederacao] < 1) return SendClientMessage(playerid,COLOR_RED,"Erro: Vocк nгo tem permissгo para usar este comando.");
new texto[256];
if(sscanf(params,"s",texto)) return SendClientMessage(playerid, COR_USOCORRETO, "Uso correto: /cnn [texto]");
new string[128];
format(string, sizeof(string), "~b~%s: ~w~%s",Nome(playerid),texto);
for(new i = 0; i < MAX_PLAYERS; i++)
if(GetDistanceBetweenPlayers(playerid, i) <= 50)
{
GameTextForPlayer(i, string, 5000, 5);
}
return 1;
}
eu gostaria de por para todos do server ver.
Reply
#2

GameTextForPlayer > GameTextForAll

O loop nгo й necessбrio
pawn Код:
CMD:cnn(playerid, params[])
{
    if(PlayerInfo[playerid][pAdministrador] < 1 && PlayerInfo[playerid][pMonitor] < 1 && PlayerInfo[playerid][pFederacao] < 1) return SendClientMessage(playerid,COLOR_RED,"Erro: Vocк nгo tem permissгo para usar este comando.");

    new texto[128];
    if(sscanf(params,"s",texto)) return SendClientMessage(playerid, COR_USOCORRETO, "Uso correto: /cnn [texto]");
    new string[128];
    format(string, sizeof(string), "~b~%s: ~w~%s",Nome(playerid),texto);

    GameTextForAll(string, 5000, 5);
    return 1;
}
Reply
#3

https://sampwiki.blast.hk/wiki/GameTextForAll


pawn Код:
CMD:cnn(playerid, params[])
{
     new Texto[ 128 ], string [ 129 ];
     
     if(PlayerInfo[playerid][pAdministrador] < 1 && PlayerInfo[playerid][pMonitor] < 1 && PlayerInfo[playerid][pFederacao] < 1) return SendClientMessage(playerid,COLOR_RED,"Erro: Vocк nгo tem permissгo para usar este comando.");
   
     if(sscanf(params,"s",texto)) return SendClientMessage(playerid, COR_USOCORRETO, "Uso correto: /cnn [texto]");
     
     format(string, sizeof(string), "~b~%s: ~w~%s",Nome(playerid),texto);
     GameTextForAll(string, 5000, 5);
     return 1;
}
Reply
#4

vlw Vini +rep pra vocк
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)