SA-MP Forums Archive
[Ajuda] Erro limita as msgs - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Erro limita as msgs (/showthread.php?tid=563273)



Erro limita as msgs - oliverarrow - 14.02.2015

Nгo sei pq todas as msgs com comandos ficam pequenas, nгo enviam mts caracters e essa ta bugadona tem q escrever no maximo /r 1234, se passar disso da unkom e nгo vai nada, e se escrever certo tbm da unkown, todo texto mandando por comando fica bem pequeno... pq?

Код:
	CMD:r(playerid, params[]) {
		if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_RED, "Vocк nгo й um COP.");
		new texto;
		new string[80];
		new family;
		if(sscanf(params,"s", texto)) {
			SendClientMessage(playerid, -1, "Use: /r [text]");
			return 1;
		}
		new patentename[20];
		if(patente[playerid] == 1) { patentename = "Recruit"; }
		else if(patente[playerid] == 2) { patentename = "Soldier"; }
		else if(patente[playerid] == 3) { patentename = "Cable"; }
		else if(patente[playerid] == 3) { patentename = "Sergeant"; }
		else if(patente[playerid] == 3) { patentename = "Lieutenant"; }
		else if(patente[playerid] == 3) { patentename = "Captain"; }
		else if(patente[playerid] == 3) { patentename = "Major"; }
		else { patentename = "Medic"; }
		
		new classname[20];
		if(org[playerid] == 1) { classname = "LS-PD"; }
		else if(org[playerid] == 2) { classname = "CIA"; }
		else if(org[playerid] == 3) { classname = "SWAT"; }
		else if(org[playerid] == 4) { classname = "National Guard"; }
		else if(org[playerid] == 5) { classname = "Emergency Responder"; }
		else { classname = "COP"; }
		
		family = IsACop(playerid);
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				if(IsACop(i) == family)
				{
					format(string, sizeof(string), "** (%s) %s- %s: %s, over. **", patentename,classname, PlayerName(playerid), texto);
					SendClientMessage(i, COLOR_RADIO, string);	
					break;					
				}
			}
		}
		return 1;
	}



Re: Erro limita as msgs - MultiKill - 14.02.2015

pawn Код:
new texto;
if(sscanf(params,"s", texto)) {
Vocк estб querendo armazenar um string em uma variбvel que sу recebe nъmeros inteiros.

Vocк estб tentando fazer isto:
pawn Код:
new string;
string = "Exemplo";



Re: Erro limita as msgs - JonathanFeitosa - 14.02.2015

pawn Код:
new texto[24];
if(sscanf(params,"s[24]", texto))