SA-MP Forums Archive
[Ajuda] Comando MDC bugado - 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] Comando MDC bugado (/showthread.php?tid=574522)



Comando MDC bugado - rolex - 18.05.2015

Estou tentando criar um comando MDC, porem ele sу aparece os dados de quem o digita, e nгo aparece o nome...

onde errei?


Код:
CMD:mdc(playerid, params[])
{
	new coordsstring[128];
	new name[MAX_PLAYERS];
	new age = PlayerInfo[playerid][pAge];
	new text2[20];
	new ID;
	if(PlayerInfo[playerid][pSex]) { text2 = "Homem"; } else { text2 = "Mulher"; }
	if(sscanf(params, "u", name)) return SendClientMessage(playerid, COLOR_WHITE, "DICA: /mdc [playerid]");
	if(!IsPlayerConnected(ID)) SendClientMessage(playerid, 0xF97804FF, "Player is not connected!");
	new text1[20];
	if(PlayerInfo[playerid][pDriveLic]) { text1 = "Passou"; } else { text1 = "Nгo passou"; }
	SendClientMessage(playerid, COLOR_YELLOW,"[MDC - Mobile Data Computer]:");
	format(coordsstring, sizeof(coordsstring), "{FF9900}Nome: {FFFFFF}%s ", name);
	SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
	format(coordsstring, sizeof(coordsstring), "Sexo: {FFFFFF}%s {FF9900}", text2);
	SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
	format(coordsstring, sizeof(coordsstring), "Idade: {FFFFFF}%d {FF9900}", age);
	SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
	format(coordsstring, sizeof(coordsstring), "{FF9900}CNH: {FFFFFF}%s", text1);
	SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
	return 1;
}



Re: Comando MDC bugado - VinnyScript - 18.05.2015

Код:
CMD:mdc(playerid, params[])
{
	new coordsstring[128];
	new name[MAX_PLAYERS];
	new StringNome[45];
	new age = PlayerInfo[playerid][pAge];
	new text2[20];
	new ID;
	if(PlayerInfo[playerid][pSex]) { text2 = "Homem"; } else { text2 = "Mulher"; }
	if(sscanf(params, "u", name)) return SendClientMessage(playerid, COLOR_WHITE, "DICA: /mdc [playerid]");
	if(!IsPlayerConnected(ID)) SendClientMessage(playerid, 0xF97804FF, "Player is not connected!");
	new text1[20];
	if(PlayerInfo[playerid][pDriveLic]) { text1 = "Passou"; } else { text1 = "Nгo passou"; }
	SendClientMessage(playerid, COLOR_YELLOW,"[MDC - Mobile Data Computer]:");
	format(StringNome, sizeof(StringNome),-1"{FF9900}Nome: {FFFFFF}%s ", Name);
	SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
	format(coordsstring, sizeof(coordsstring), "Sexo: {FFFFFF}%s {FF9900}", text2);
	SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
	format(coordsstring, sizeof(coordsstring), "Idade: {FFFFFF}%d {FF9900}", age);
	SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
	format(coordsstring, sizeof(coordsstring), "{FF9900}CNH: {FFFFFF}%s", text1);
	SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
	return 1;
}