[Ajuda] Sistema de gmx - 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] Sistema de gmx (
/showthread.php?tid=571942)
Sistema de gmx -
JuniorTheDM - 23.04.2015
PHP код:
CMD:gmx(playerid)
{
if(Player[playerid][admin] != 3001) return SendClientMessage(playerid,azul,"Comando so para admin fundador!");
{
SendClientMessage(playerid,azul,"Salvando contas...");
new cont;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SalvarConta(i);
cont++;
}
}
new contag[100];
format(contag,100,"%d contas salvas.",cont);
TextDrawShowForAll(GMX[0]);
TextDrawShowForAll(GMX[1]);
TextDrawShowForAll(GMX[2]);
TextDrawShowForAll(GMX[3]);
TextDrawShowForAll(GMX[4]);
TextDrawShowForAll(GMX[5]);
TextDrawShowForAll(GMX[6]);
TextDrawShowForAll(GMX[7]);
TextDrawShowForAll(GMX[8]);
SendClientMessage(playerid,laranja,contag);
SendRconCommand("gmx");
return 1;
}
}
Qeria Colocar um Tempo Porque quando dou /gmx a Textdraw aparece e some muito rapido n da nem tempo de eles ver Me Ajudem
Re: Sistema de gmx -
Dayvison_ - 23.04.2015
Acho que ao reiniciar o servidor as TextDrawns sao destruidas e somem, ae e melhor usar GameText ou fazer assim:
PHP код:
CMD:gmx(playerid)
{
if(Player[playerid][admin] != 3001) return SendClientMessage(playerid,azul,"Comando so para admin fundador!");
{
SendClientMessage(playerid,azul,"Salvando contas...");
new cont;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SalvarConta(i);
cont++;
}
}
new contag[100];
format(contag,100,"%d contas salvas.",cont);
TextDrawShowForAll(GMX[0]);
TextDrawShowForAll(GMX[1]);
TextDrawShowForAll(GMX[2]);
TextDrawShowForAll(GMX[3]);
TextDrawShowForAll(GMX[4]);
TextDrawShowForAll(GMX[5]);
TextDrawShowForAll(GMX[6]);
TextDrawShowForAll(GMX[7]);
TextDrawShowForAll(GMX[8]);
SendClientMessage(playerid,laranja,contag);
SetTimer("GMX",tempoemms,false);
return 1;
}
}
forward GMX();
public GMX()
{
SendRconCommand("gmx");
}
Re: Sistema de gmx -
Vegassilva - 24.04.2015
Por que vocк nгo usar GameTextForPlayer no lugar das TD ...
pawn Код:
CMD:gmx(playerid, params[])
{
if(Player[playerid][admin] != 3001) return SendClientMessage(playerid,azul,"Comando so para admin fundador!");
{
new cont, contag[100];
SendClientMessage(playerid, azul, "Salvando contas ...");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SalvarConta(i);
cont++;
}
}
format(contag, 100, "%d contas salvas.", cont);
SendClientMessage(playerid, laranja, contag);
GameTextForPlayer(playerid, "~w~ Salvando Contas .", 2500, 3);
SendRconCommand("gmx");
}
return 1;
}