[Ajuda] Erro no comando
#1

Quando eu executo o comando /criarhelper, o servidor cai como se fosse uma gmx mas nao salva nada.

Код:
CMD:criarhelper(playerid, params[])
	{
	    	if (PlayerInfo[playerid][pAdmin] != 1339 && PlayerInfo[playerid][pAdmin] != 5000)
	    	{
				SendClientMessage(playerid, COLOR_GRAD1, "	Vocк nгo pode usar este comando!");
				return 1;
	    	}
			new para2;
			new level2;
			if(sscanf(params, "ud", para2, level2))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /criarhelper [ID do Player] [Nнvel(de 1 a 300)]");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			GetPlayerName(para2, giveplayer, sizeof(giveplayer));
		    if(IsPlayerConnected(para2))
		    {
		        if(para2 != INVALID_PLAYER_ID)
		        {

					if(!TemVagaHelper() && PlayerInfo[para2][pHelper] < 1)return SendClientMessage(playerid, COLOR_GRAD1, "Sem vagas de helpers, use: /limparhelper para limpar uma vaga!");
            	    new string[200];

       				format(string, sizeof(string), "   Vocк promoveu %s para nнvel %d de Helper.", giveplayer,level2);
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					format(string, sizeof(string), "   Vocк foi promovido a nнvel %d de Helper, pelo admin %s", level2, sendername);
					SendClientMessage(para2, COLOR_LIGHTBLUE, string);
					getdate(year, month, day);
					gettime(hour,minute,second);
					format(string, sizeof(string), "%s deu Helper Nнvel %d para %s [%d/%d/%d] бs [%d:%d:%d].", sendername, level2, NomePlayer(para2), day,
					month, year, hour, minute, second);
					BHSLogs("darhelper", string);
					PlayerInfo[para2][pHelper] = level2;
					if(level2 > 0)
					{
					    SetVagaHelper(NomePlayer(para2), level2);
						AddHelper(NomePlayer(para2), level2);
					}
					else
					{
					    SetPlayerToTeamColor(para2);
	               		SetPlayerHealth(para2, 100);
					    PlayerInfo[para2][pHelper] = 0;
	               		helpertrampando[para2] = 0;
						RemoverHelper(NomePlayer(para2));
						RemoveVagaHelper(NomePlayer(para2));
					}
				}
			}
			return 1;
	}
@EDIT


E tem esses "stocks" aqui

Код:
stock AddHelper(Nome[], nivel)
{
	new stradmin[50];
	format(stradmin, sizeof stradmin, Pasta_Helpers, Nome);
	if(!DOF2_FileExists(stradmin))DOF2_CreateFile(stradmin);
	DOF2_SetInt(stradmin, "HelperNivel", nivel);
	return true;
}
stock RemoverHelper(Nome[])
{
	new stradmin[50];
	format(stradmin, sizeof stradmin, Pasta_Helpers, Nome);
	if(DOF2_FileExists(stradmin))DOF2_RemoveFile(stradmin);
	return true;
}
Reply
#2

Quote:

CMD:criarhelper(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] != 1337 && PlayerInfo[playerid][pAdmin] != 3001 && PlayerInfo[playerid][pAdmin] != 5000)
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode usar este comando!");
return 1;
}
new para2;
new level2;
if(sscanf(params, "ud", para2, level2))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /criarhelper [ID do Player] [Nнvel(de 1 a 300)]");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(para2, giveplayer, sizeof(giveplayer));
if(IsPlayerConnected(para2))
{
if(para2 != INVALID_PLAYER_ID)
{

if(!TemVagaHelper() && PlayerInfo[para2][pHelper] < 1)return SendClientMessage(playerid, COLOR_GRAD1, "Sem vagas de helpers, use: /limparhelper para limpar uma vaga!");
new string[200];

format(string, sizeof(string), " Vocк promoveu %s para nнvel %d de Helper.", giveplayer,level2);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк foi promovido a nнvel %d de Helper, pelo admin %s", level2, sendername);
SendClientMessage(para2, COLOR_LIGHTBLUE, string);
getdate(year, month, day);
gettime(hour,minute,second);
format(string, sizeof(string), "%s deu Helper Nнvel %d para %s [%d/%d/%d] бs [%d:%d:%d].", sendername, level2, NomePlayer(para2), day,
month, year, hour, minute, second);
BTLLogs("darhelper", string);
PlayerInfo[para2][pHelper] = level2;
if(level2 > 0)
{
SetVagaHelper(NomePlayer(para2), level2);
AddHelper(NomePlayer(para2), level2);
}
else
{
SetPlayerToTeamColor(para2);
SetPlayerHealth(para2, 100);
PlayerInfo[para2][pHelper] = 0;
helpertrampando[para2] = 0;
RemoverHelper(NomePlayer(para2));
RemoveVagaHelper(NomePlayer(para2));
}
}
}
return 1;
}

stock AddHelper(Nome[], nivel)
{
new stradmin[50];
format(stradmin, sizeof stradmin, Pasta_Helpers, Nome);
if(!DOF2_FileExists(stradmin))DOF2_CreateFile(stra dmin);
DOF2_SetInt(stradmin, "HelperNivel", nivel);
return true;
}
stock RemoverHelper(Nome[])
{
new stradmin[50];
format(stradmin, sizeof stradmin, Pasta_Helpers, Nome);
if(DOF2_FileExists(stradmin))DOF2_RemoveFile(strad min);
return true;
}

.-..-.
Reply
#3

Quote:
Originally Posted by Sthol
Посмотреть сообщение
.-..-.
Uй mas oque mudou? '-'
Reply
#4

Vocк verificou se os arquivos de salvamento dos helpers na pasta scriptfiles estгo corretos?
Reply
#5

vocк criou a pasta em Scriptfiles?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)