18.05.2015, 00:39
Estou tentando criar um comando MDC, porem ele sу aparece os dados de quem o digita, e nгo aparece o nome...
onde errei?
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;
}

