21.11.2014, 19:43
(
Последний раз редактировалось SukMathcuck; 21.11.2014 в 20:58.
)
Tipo pessoal, vou ser bastante detalhado para vcs entenderem e eu nгo digitar isso em vгo, й o seguinte, tenho aqui um sistema e queria saber como posso sentar o nome do arquivo cfg pra outro nome usando Dini, tipo, vou mostrar uma parte do comando..
* quero sу mudar o nome do arquivo cfg atual para o nome do comprador..
Obs: esse cуdigo ae eu fiz rбpido e peguei a base de um sistema de HP, rsrsrs
Caso deseja mais algo do sistema sу falar;
Quem ajudar garanto +reputaзгo
Aparecem profissionais do fуrum samp!
* quero sу mudar o nome do arquivo cfg atual para o nome do comprador..
pawn Код:
else if (strcmp(x_Emprego, "veiculo", true) == 0) // comando (( /aceitar veiculo ))
{
new Vendedor = TransferenciaVeh2[playerid];
if (TransferenciaVeh[playerid] == 1)
{
if (IsPlayerConnected(TransferenciaVeh2[playerid]))
{
new str[256];
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(Vendedor, giveplayer, sizeof(giveplayer));
format(str, 256, "* %s aceitou sua proposta de consulta.", GetPlayerNameRP(playerid));
SendClientMessage(Vendedor, COLOR_LIGHTBLUE, str);
format(str, 256, "O dinheiro serб adicionado ao seu salбrio.");
SendClientMessage(Vendedor, COLOR_LIGHTBLUE, str);
format(str, 256, "* Vocк aceitou o atendimento do mйdico %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
format(string, sizeof(string), "* Mйdico(a) %s estб atendendo paciente %s.", giveplayer, sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
TransferenciaVeh[playerid] = 0;
GivePlayerMoneyEx(Vendedor, PrecoVeiculo[playerid]);
new Placa = PlayerInfo[Vendedor][pCarro];
PlayerInfo[playerid][pCarro] = Placa;
PlayerInfo[Vendedor][pCarro] = 255;
// Nгo sei oque eu faзo daqui para baixo, pois ali em cima senta tudo certim, mais aqui em baixo que era para mudar o nome arquivo cfg para o que comprou.
/* new PlayerNick[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerNick, sizeof(PlayerNick));
new arquivo[256];
format(arquivo, sizeof(arquivo), "/Concessionaria/Proprietarios/%s.ini", PlayerNick);// aqui fica localizado o dono do carro que e agente precisa mudar.
if (!dini_Exists(arquivo)) // isso aqui pra baixo й algo que copiei nem sei oque fazer com isso '.'
{
new idx = 1;
while (idx < sizeof(Carro))
{
if (strcmp(Carro[idx][cDono], "Ninguem", true) == 0)
{
strmid(Carro[idx][cDono], PlayerNick, 0, strlen(PlayerNick), MAX_PLAYER_NAME);
TaNoCarro[playerid] = idx;
return 1;
}
else
{
idx++;
}
}
}*/
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Mйdico que tentou lhe atendeu nгo estб no momento.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Ninguйm lhe ofereceu uma consulta.");
return 1;
}
}
Caso deseja mais algo do sistema sу falar;
Quem ajudar garanto +reputaзгo
Aparecem profissionais do fуrum samp!