[Ajuda] Como por "SendClientMessageToAll" no Ban System.
#6

Quote:
Originally Posted by SonicPaintballer
Посмотреть сообщение
lembre-se de colocar new string[256 ou o numero q vc usa]; no public do command
pawn Код:
format(string, sizeof(string),"sua frase aqui");
    SendClientMessageToAll(COLOR_LIGHTRED, string);
Ao fazer o q vc me disse dб estes erros:

Код:
C:\Users\Utilizador\Desktop\samp03x_svr_R1-2_win32\filterscripts\sampban.pwn(103) : error 001: expected token: ";", but found "if"
C:\Users\Utilizador\Desktop\samp03x_svr_R1-2_win32\filterscripts\sampban.pwn(103) : warning 217: loose indentation
C:\Users\Utilizador\Desktop\samp03x_svr_R1-2_win32\filterscripts\sampban.pwn(106) : warning 217: loose indentation
C:\Users\Utilizador\Desktop\samp03x_svr_R1-2_win32\filterscripts\sampban.pwn(107) : warning 217: loose indentation
C:\Users\Utilizador\Desktop\samp03x_svr_R1-2_win32\filterscripts\sampban.pwn(108) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Vou deixar aqui como eu tou a fazer:

Код:
public OnBanResponse(index, response_code, data[])
{
new string[256]
    if(response_code == 200)
		if(strcmp(data, "Success?Ban added", true)) printf("[SAMP-BANS]: Error,  API responded with: %s", data);
		else SendClientMessage(index, 0xFFFFFF, "The ban was added");
		format(string, sizeof(string),"O jogador %s foi banido do servidor!");
    SendClientMessageToAll(COLOR_RED, string);
    else printf("[SAMP-BANS]: Encountered an error, the page didn't respond");
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)