18.01.2017, 14:11
Preciso de ajuda, toda vez que dou o comando /criarhelper o servidor desliga, ja olhei o codigo e nao vejo nada que pode estar causando isso, me ajudem pfv.
Cуdigo:
Cуdigo:
Код:
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); BPFLogs("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(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; }