[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


Messages In This Thread
Erro no comando - by Fix3r - 11.02.2017, 16:49
Re: Erro no comando - by Sthol - 11.02.2017, 16:53
Re: Erro no comando - by Fix3r - 11.02.2017, 16:56
Re: Erro no comando - by ziiQz - 11.02.2017, 19:59
Re: Erro no comando - by Carlos001 - 11.02.2017, 20:13

Forum Jump:


Users browsing this thread: 1 Guest(s)