Jump to content

BuNiCu-RP

Membru
  • Posts

    160
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by BuNiCu-RP

  1. Verifica error_log la mysql si vezi ce erori ai legate la conectare/inregistrare.
  2. Serios? Aici se cere ajutor legat de un tutorial.
  3. Verifica plugin/.inc de la mysql.
  4. Salut poti incerca asa: #define MAX_UPDATE_LENGTH 1500 #define UPDATE_DIALOG 5879 #define UPDATE_DIALOG_NAME "Server Updates" #define ShowUpdateDialog(%0,%1) ShowPlayerDialog(%0, UPDATE_DIALOG, 0, UPDATE_DIALOG_NAME, %1, "Close", "") CMD:updates(playerid, params) { new updateString[MAX_UPDATE_LENGTH]; // Big large string if(strlen(updateString) > MAX_UPDATE_LENGTH) return 0; format(updateString, sizeof(updateString), "Text Update"); format(updateString, sizeof(updateString), "%s\nText Update", updateString); format(updateString, sizeof(updateString), "%s\nText Update", updateString); format(updateString, sizeof(updateString), "%s\nText Update", updateString); format(updateString, sizeof(updateString), "%s\nText Update", updateString); format(updateString, sizeof(updateString), "%s\nText Update", updateString); format(updateString, sizeof(updateString), "%s\nText Update", updateString); format(updateString, sizeof(updateString), "%s\nText Update", updateString); format(updateString, sizeof(updateString), "%s\nText Update", updateString); ShowUpdateDialog(playerid, updateString); return 1; }
  5. #define mysql_host "localhost" #define mysql_user "root" #define mysql_password "" #define mysql_database "baza4" new handle; forward MySQLConnect(); public MySQLConnect() { handle = mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password); if(handle && mysql_errno(handle) == 0) { printf("[MYSQL]: Connection to database (%s) was established!", mysql_database); } else { printf("[MYSQL]: Connection to database (%s) failed!", mysql_database); SendRconCommand("exit"); } return 1; } Dupa ce modifici verifica server log.
  6. new name[MAX_PLAYERS], string[128], stringx[128], players[MAX_PLAYERS], count; foreach(new i : Player) { if(IsPlayerConnected(i)) { if(IsBot[i] == 0) { if(PlayerInfo[i][pSleeping] == 0) { if(IsPlayerAFK[i] >= 1680) { SS(i, COLOR_LIGHTRED, "Daca nu te misti vei primi kick in 2 minute.", "If you don't move you will be kicked in 2 minutes."); } if(IsPlayerAFK[i] >= 1800) { count ++; SS(i, COLOR_WHITE, "Ai primit kick pentru ca ai fost AFK mai mult de 30 de minute.", "You were kicked for being AFK (away from keyboard) for more than 30 minutes."); SS(i, COLOR_WHITE, "Pentru a-ti lasa caracterul AFK mai mult de 30 de minute, foloseste /sleep intr-o casa.", "To leave your character AFK for longer than 30 minutes, use /sleep in a house."); SendClientMessage(i, COLOR_GENANNOUNCE, "You have been kicked for being AFK."); GetPlayerName(i, name, sizeof(name)); if(count > 0) { format(players, sizeof(players), "%s, ", name); strcat(stringx, players); } new var100[300]; mysql_format(SQL, var100, sizeof(var100), "INSERT INTO kicklogs (`playerid`,`giverid`,`playername`,`givername`,`reason`) VALUES ('%d','3','%s','AdmBot','AFK for more than 30 minutes')", PlayerInfo[i][pSQLID],PlayerInfo[i][pNormalName]); mysql_tquery(SQL,var100,"",""); KickEx(i); } } } } } if(count > 0) { format(string, sizeof(string), "%s was kicked by AdmBot for being AFK for more than 30 minutes.", stringx); strdel(string, strlen(stringx)-2, strlen(stringx)-1); SendClientMessageToAll(COLOR_LIGHTRED, string); } else { format(string, sizeof(string), "%s was kicked by AdmBot for being AFK for more than 30 minutes.", name); SendClientMessageToAll(COLOR_LIGHTRED, string); } asta ar trebui sa rezolve problema ta.
  7. new name[MAX_PLAYERS], string[128], stringx[128], players[MAX_PLAYERS], count; foreach(new i : Player) { if(IsPlayerConnected(i)) { if(IsBot[i] == 0) { if(PlayerInfo[i][pSleeping] == 0) { if(IsPlayerAFK[i] >= 1680) { SS(i, COLOR_LIGHTRED, "Daca nu te misti vei primi kick in 2 minute.", "If you don't move you will be kicked in 2 minutes."); } if(IsPlayerAFK[i] >= 1800) { count++; SS(i, COLOR_WHITE, "Ai primit kick pentru ca ai fost AFK mai mult de 30 de minute.", "You were kicked for being AFK (away from keyboard) for more than 30 minutes."); SS(i, COLOR_WHITE, "Pentru a-ti lasa caracterul AFK mai mult de 30 de minute, foloseste /sleep intr-o casa.", "To leave your character AFK for longer than 30 minutes, use /sleep in a house."); SendClientMessage(i, COLOR_GENANNOUNCE, "You have been kicked for being AFK."); GetPlayerName(i, name, sizeof(name)); if(count > 0) { format(players, sizeof(players), "%s, ", GetNameEx(i)); strcat(stringx, players); } new var100[300]; mysql_format(SQL, var100, sizeof(var100), "INSERT INTO kicklogs (`playerid`,`giverid`,`playername`,`givername`,`reason`) VALUES ('%d','3','%s','AdmBot','AFK for more than 30 minutes')", PlayerInfo[i][pSQLID],PlayerInfo[i][pNormalName]); mysql_tquery(SQL,var100,"",""); KickEx(i); } } } } } if(count > 0) { format(string, sizeof(string), "%s was kicked by AdmBot for being AFK for more than 30 minutes.", stringx); strdel(string, strlen(stringx)-2, strlen(stringx)-1); SendClientMessageToAll(COLOR_LIGHTRED, string); } else { format(string, sizeof(string), "%s was kicked by AdmBot for being AFK for more than 30 minutes.", name); SendClientMessageToAll(COLOR_LIGHTRED, string); }
  8. LoadCar(); for(new z = carsonserver; z < sizeof(CarInfo); z++) { AddStaticVehicleEx(CarInfo[z][cModel],CarInfo[z][cLocationx],CarInfo[z][cLocationy],CarInfo[z][cLocationz]+1.0,CarInfo[z][cAngle],CarInfo[z][cColorOne],CarInfo[z][cColorTwo],60000); LoadComponents(z); format(TextCar, sizeof(TextCar), "%s-%s-%s", CarInfo[z][cPlate1], CarInfo[z][cPlate2], CarInfo[z][cPlate3]); TextUpCar[z] = Create3DTextLabel(TextCar, 0x33AAFFFF , 0.0, 0.0, 0.0, 25, 0, 1); Attach3DTextLabelToVehicle(TextUpCar[z], z, 0.0, 0.0, 0.1); }
  9. Salut, incearca acest cod te rog new name[MAX_PLAYERS], string[128], stringx[128], players[MAX_PLAYERS], count; foreach(new i : Player) { if(IsPlayerConnected(i)) { if(IsBot[i] == 0) { if(PlayerInfo[i][pSleeping] == 0) { if(IsPlayerAFK[i] >= 1680) { SS(i, COLOR_LIGHTRED, "Daca nu te misti vei primi kick in 2 minute.", "If you don't move you will be kicked in 2 minutes."); } if(IsPlayerAFK[i] >= 1800) { count++; SS(i, COLOR_WHITE, "Ai primit kick pentru ca ai fost AFK mai mult de 30 de minute.", "You were kicked for being AFK (away from keyboard) for more than 30 minutes."); SS(i, COLOR_WHITE, "Pentru a-ti lasa caracterul AFK mai mult de 30 de minute, foloseste /sleep intr-o casa.", "To leave your character AFK for longer than 30 minutes, use /sleep in a house."); SendClientMessage(i, COLOR_GENANNOUNCE, "You have been kicked for being AFK."); GetPlayerName(i, name, sizeof(name)); if(count > 0) { format(players, sizeof(players), "%s, ", GetNameEx(i)); strcat(stringx, players); } new var100[300]; mysql_format(SQL, var100, sizeof(var100), "INSERT INTO kicklogs (`playerid`,`giverid`,`playername`,`givername`,`reason`) VALUES ('%d','3','%s','AdmBot','AFK for more than 30 minutes')", PlayerInfo[i][pSQLID],PlayerInfo[i][pNormalName]); mysql_tquery(SQL,var100,"",""); KickEx(i); } } } } } format(string, sizeof(string), "%s was kicked by AdmBot for being AFK for more than 30 minutes.", stringx); strdel(string, strlen(stringx)-2, strlen(stringx)-1); SendClientMessageToAll(COLOR_LIGHTRED, string);
  10. http://wiki.sa-mp.com/wiki/MySQL/R33#mysql_connect
  11. stock LoadCargos() { new query[256]; for(new i = 0; i < MAX_CARGO; i++) { format(query, sizeof(query), "SELECT * FROM cargos WHERE ID=%d", i); mysql_function_query(handlesql, query, true, "LoadCargo", "d", i); } printf("LOADING CARGO..."); return 1; }
  12. GM modular pe ini? Încerca pe mysql, și verifica un tutorial pentru login/register ini
  13. @soleko https://www.sa-mp.ro/forums/forum/355-ajutor-scripting/?do=add
  14. 1. Acele coduri se adauga la OnVehicleSpawn(); http://wiki.sa-mp.com/wiki/OnVehicleSpawn 2. Acela se numeste dns, se poate face din cpanel -> DNS Zone Editor.
  15. TextDrawTextSize(Text:textdraw, 20.380462, 86.613349);
  16. #debug printf("%f", stuntnrg[randoms][0]); printf("%f", stuntnrg[randoms][1]); printf("%f", stuntnrg[randoms][2]);
  17. Salut, prin asta apelezi functia SetRaceCheckpointAll cu un parametru pe care el nu il apeleaza. SetTimerEx("SetRaceCheckpointAll", 1000, false, "i"); Funtia corecta care trebuie apelata: SetTimer("SetRaceCheckpointAll", 1000, false);
  18. forward SetRaceCheckpointAll(); public SetRaceCheckpointAll() { for (new i = 0, j = GetPlayerPoolSize(); i <= j; i++) { if(stunton[i] == 1) { // Cei care sunt la event vor primi toti acelasi CP. new randoms = random(sizeof(stuntnrg)); SetPlayerCheckpoint(i, stuntnrg[randoms][0], stuntnrg[randoms][1], stuntnrg[randoms][2], 1.0); SetPlayerMapIcon(i, 53, stuntnrg[randoms][0], stuntnrg[randoms][1], stuntnrg[randoms][2], 53, MAPICON_GLOBAL_CHECKPOINT); pickup_event = CreatePickup(1274, 2, stuntnrg[randoms][0], stuntnrg[randoms][1], stuntnrg[randoms][2], GetPlayerVirtualWorld(i)); } } // Asta anunta tot serverul acel mesaj SendClientMessageToAll(-1, "A new stunting event has just started. It has been marked on your Map with a Black&White Race Flag Get there first and you'II win."); return 1; } Un mic exemplu
  19. Frumos tutorial, rezultatul final ma da pe spate. Cand mai faci un tutorial, nu uita de limba romana si de cei newbie
  20. @WopsS - if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 522) return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu esti intr-un NRG-500 ."); Chiar daca este intr-un vehicul NRG-500 ii va da eroare. De asta i-am dat verificarea aia != daca nu este egal cu modelul unui nrg.
  21. if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 522) return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu esti intr-un NRG-500 ."); if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 522) { if(stunton[playerid] == 1) { new playername[25]; new string[MAX_STRING]; GetPlayerName(playerid, playername, sizeof(playername)); new randmoney = 3500 + random(90000); //DisablePlayerCheckpoint(playerid); stunton[playerid] = 0; RemovePlayerMapIcon(playerid, 1274); DestroyPickup(pickup_event); format(string,sizeof(string),"{CF165D}%s A castigat STUNT-ul, acesta a castigat %d$.", playername, randmoney); SendClientMessageToAll( -1, string); GivePlayerCash(playerid, randmoney); Update(playerid, pCashx); DisablePlayerCheckpoint(playerid); SendClientMessage(playerid, -1, "Un nou stunt incepe la 30 minute."); SendClientMessage(playerid, -1, "STUNT-ul este in perioada de probe Nu este finalizat."); SendClientMessage(playerid, -1, "Ai gasit-o pe Elodia!"); } }
  22. BuNiCu-RP

    Problema

    // War deelay for(new i = 0; i < sizeof(FactionDeelay); i++) { if(FactionDeelay[i] >= 1) { FactionDeelay[i] --; if(FactionDeelay[i] == 0) { SendFactionMessage(i, COLOR_MONEY, "[WAR] Acum mafia ta poate ataca un teritoriu!"); } } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.