Jump to content

BuNiCu-RP

Membru
  • Posts

    160
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by BuNiCu-RP

  1. Verifica unde îi faci update la skin să ii updateze şi în TD
  2. Fai un update la plugin mysql
  3. Schimba vText cu vText[MAX_VEHICLES]; Si în comanda vText[vehicleid] = ;
  4. @Krusher este un stock se apeleaza doar când este apelată comanda, nu creaza lag. se poate da t/c
  5. stock LoadEnterFactions(playerid) { new rows; new Cache:result = mysql_query(g_SQL, "SELECT * FROM `factions`"); if(cache_get_row_count(rows) > 0) { for(new z = 0; z < cache_get_row_count(rows); z++) { for(new f = 0; f < rows; f++) { cache_get_value_float(f, "F_PosX", FVar:z[PosX]); cache_get_value_float(f, "F_PosY", FVar:z[PosY]); cache_get_value_float(f, "F_PosZ", FVar:z[PosZ]); cache_get_value_float(f, "F_EnterY", FVar:z[EntX]); cache_get_value_float(f, "F_EnterY", FVar:z[EntY]); cache_get_value_float(f, "F_EnterZ", FVar:z[EntZ]); cache_get_value_float(f, "F_EnterA", FVar:z[EntA]); cache_get_value_int(f, "VW", FVar:z[VW]); cache_get_value(f, "F_Name", FVar:z[Name], 64); new string[132]; format(string, sizeof(string), "~h~Bine ati venit la ~n~~y~%s", FVar:z[Name]); if(IsPlayerInRangeOfPoint(playerid, 7.0, FVar:z[PosX], FVar:z[PosY], FVar:z[PosZ])) { printf("Faction %s (Exit Pos: %.f, %.f, %.f)", FVar:z[Name], FVar:z[PosX], FVar:z[PosY], FVar:z[PosZ]); printf("Faction %s (Enter Pos: %.f, %.f, %.f)", FVar:z[Name], FVar:z[EntX], FVar:z[EntY], FVar:z[EntZ]); SetPlayerInterior(playerid, FVar:z[Interior]); SetPlayerPos(playerid, FVar:z[EntX], FVar:z[EntY], FVar:z[EntZ]); GameTextForPlayer(playerid, string, 1000, 4); // SetPlayerFacingAngle(playerid, FVar:z[EntA]); // SetPlayerVirtualWorld(playerid, FVar:z[VW]); } } } } cache_delete(result); return 1; } Ce ii pot afec acestui cod sa functioneze in parametri optimi? Adica el functioneaza, insa cand folosesc /enter pur si simplu ma spawneaza in aer...
  6. Verifica conexiunea cu baza de date si server. Daca ai probleme iti pot aparea errori, sau este un bug la sistemul de login.
  7. Problema o ai de la acest for(new xf = 0; xf < MAX_PERSONAL_CARS; xf++) Verifica numarul maxim la MAX_PERSONAL_CARS;
  8. https://www.dropbox.com/s/4dbqvo3gchgiv5p/MAP Convertor.7z?dl=0
  9. DisablePlayerCheckpoint(playerid); switch(DMVCheckpoint[playerid]) { case 1: { DisablePlayerCheckpoint(playerid); CPDMV[playerid] ++; SetPlayerCheckpoint(playerid, 919.6411, -1487.5270, 13.4656, 5.0); } case 2: SetPlayerCheckpoint(playerid, 919.8101, -1354.0464, 13.2831, 5.0); case 3: SetPlayerCheckpoint(playerid, 919.8101, -1354.0464, 13.2831, 5.0); case 4: SetPlayerCheckpoint(playerid, 881.8291, -1321.7100, 13.6602, 5.0); case 5: SetPlayerCheckpoint(playerid, 732.3776, -1316.2760, 13.4840, 5.0); case 6: SetPlayerCheckpoint(playerid, 636.0119, -1294.8287, 14.9896, 5.0); case 7: SetPlayerCheckpoint(playerid, 590.5417, -1222.1847, 17.9030, 5.0); case 8: SetPlayerCheckpoint(playerid, 187.7140, -1497.6492, 12.6371, 5.0); case 9: SetPlayerCheckpoint(playerid, 195.1679, -1525.3085, 13.3437, 5.0); case 10: SetPlayerCheckpoint(playerid, 304.0753, -1484.3490, 32.9891, 5.0); case 11: SetPlayerCheckpoint(playerid, 396.5493, -1423.1467, 33.8726, 5.0); case 12: SetPlayerCheckpoint(playerid, 452.5795, -1458.2029, 28.8690, 5.0); case 13: SetPlayerCheckpoint(playerid, 625.2048, -1419.8362, 13.6259, 5.0); case 14: SetPlayerCheckpoint(playerid, 650.4113, -1588.8108, 15.4165, 5.0); case 15: SetPlayerCheckpoint(playerid, 849.6292, -1604.8254, 13.4752, 5.0); case 16: SetPlayerCheckpoint(playerid, 915.2281, -1588.2057, 13.4751, 5.0); case 17: { DisablePlayerCheckpoint(playerid); CPDMV[playerid] ++; SetPlayerCheckpoint(playerid, 942.9560, -1756.2139, 13.6392, 5.0); } }
  10. Ma refer stric la dialog nu la chat.
  11. Salut, ce parere aveti, ar merita sa fie pe un gamemode?
  12. Multumesc foarte mult de ajutor @WopsS
  13. pPayDay = Minute, si chestia aia nici eu nu mai stiu dece...
  14. Salut, ma tot bat cu un float de cateva zile, sper ca voi sa imi dati o solutie buna. new Float:converTime = floatround(floatmul(PlayerInfo[i][pPayDay]/60+1, 0.99), floatround_ceil); format(stringsu,sizeof(stringsu),"Ai primit %.2f ore jucate (Ai jucat %d minute pe server) ", converTime, PlayerInfo[i][pPayDay]/60+1); iar rezultatul este ceva de genul: Ai primit 33.0 ore jucate (Ai jucat 33 minute pe server) asi dori ceva de genul: Ai primit 0.33 ore jucate (Ai jucat 33 minute pe server) cand e sub 55 minute jucate si cand este peste 55 minute sa arate ceva de genu: Ai primit 1 ore jucate (Ai jucat 55 minute pe server)
  15. Problema intalnita (descriere): Vreau sa salveze anumite field cand trece ziua, gen : 23:59 sa faca update.Ero(area / rile) / warning-(ul / urile): http://imgur.com/395jAsHLiniile de cod / sursa / script-ul(obligatoriu): function ExpireWithDay() { new time1, time2, time3; gettime(time1, time2, time3); new Cache: Result, query[128], rows; if(time1 == 23 && time2 == 55) { format(query, sizeof(query), "SELECT COUNT(*) as total_rows FROM `users`"); Result = mysql_query(SQL, query, true); rows = cache_get_field_content_int(0, "total_rows", SQL); for(new i = 1; i < rows; i++) { ClanIsOwned(i); // Check clan is owned by AccIsPremium(i); // Check Premium Account IsAPPCar(i, 1); // Premium Car ID 1 IsAPPCar(i, 2); // Premium Car ID 2 IsAPPCar(i, 3); // Premium Car ID 3 IsDDAcc(i); // Check is buy premium account UpdateGiftDay(i); // Update user or not /getbonus printf("[ID: %d] Update %d milliseconds times", i, cache_get_query_exec_time(UNIT_MILLISECONDS)); } return 1; } cache_delete(Result); return 0; } Imagini / Video (optional): N/AAti incercat sa rezolvati singur?: Da.
  16. Poziţie: scripter / mapperAlte detalii: Caut pe cineva cu experienta si de incredere, am nevoie urget de o persoana cu capul pe umeri. PM pentru mai multe informatii
  17. Multumesc de raspuns. Nu sunt scripter, doar incerc sa invat, nici tu cand ai inceput nu ai fost expert T/C
  18. Problema intalnita (descriere): Nu face update in DB chiar daca in server_log imi arata debug-ul...Ero(area / rile) / warning-(ul / urile): Nu sunt erori credLiniile de cod / sursa / script-ul(obligatoriu): function ExpireWithDay() { new time[3], str[255]; gettime(time[0], time[1], time[2]); foreach(Player, i) { if(time[0] == 23 && time[1] == 59) { if(PlayerInfo[i][pClan] != 0) { ClanInfo[PlayerInfo[i][pClan]][cClanExpire]--; mysql_format(SQL, str, sizeof(str), "UPDATE `clans` SET `clanExpire`='%d' WHERE `clanID`='%d' AND `clanActive`='1'",ClanInfo[PlayerInfo[i][pClan]][cClanExpire], PlayerInfo[i][pClan]); mysql_tquery(SQL, str, "", ""); } if(PlayerInfo[i][pPremiumAccount] != 0) { PlayerInfo[i][pExpireAccount]--; mysql_format(SQL, str, sizeof(str), "UPDATE `users` SET `Expire`='%d' WHERE `name`='%s'", PlayerInfo[i][pExpireAccount], GetName(i)); mysql_tquery(SQL, str, "", ""); } if(PlayerInfo[i][pDDCar1] != 0 && PlayerInfo[i][pDDCar1Key] != 0) { CarInfo[PlayerInfo[i][pDDCar1Key]][cTimed]++; mysql_format(SQL, str, sizeof(str), "UPDATE `cars` SET `Timed`='%d' WHERE `ID`='%d' AND `Owner`='%s'", CarInfo[PlayerInfo[i][pDDCar1Key]][cTimed], PlayerInfo[i][pDDCar1Key], GetName(PlayerInfo[i][pNormalName])); mysql_tquery(SQL, str, "", ""); } if(PlayerInfo[i][pDDCar2] != 0 && PlayerInfo[i][pDDCar2Key] != 0) { CarInfo[PlayerInfo[i][pDDCar2Key]][cTimed]++; mysql_format(SQL, str, sizeof(str), "UPDATE `cars` SET `Timed`='%d' WHERE `ID`='%d' AND `Owner`='%s'",CarInfo[PlayerInfo[i][pDDCar2Key]][cTimed], PlayerInfo[i][pDDCar2Key], GetName(PlayerInfo[i][pNormalName])); mysql_tquery(SQL, str, "", ""); } if(PlayerInfo[i][pDDCar3] != 0 && PlayerInfo[i][pDDCar3Key] != 0) { CarInfo[PlayerInfo[i][pDDCar3Key]][cTimed]++; mysql_format(SQL, str, sizeof(str), "UPDATE `cars` SET `Timed`='%d' WHERE `ID`='%d' AND `Owner`='%s'",CarInfo[PlayerInfo[i][pDDCar3Key]][cTimed], PlayerInfo[i][pDDCar3Key], GetName(PlayerInfo[i][pNormalName])); mysql_tquery(SQL, str, "", ""); } if(PlayerInfo[i][pDDBuy] > 0) { PlayerInfo[i][pDDTime]--; mysql_format(SQL, str, sizeof(str), "UPDATE `users` SET `DDTime`='%d' WHERE `name`='%s'", PlayerInfo[i][pDDTime], GetName(i)); mysql_tquery(SQL, str, "", ""); } printf("Update all field!"); } } printf("Update x3 !"); return 1; } Imagini / Video (optional): -- Ati incercat sa rezolvati singur?: Da, ma chinui de 2 zile
  19. Sa mai dus inca un scripter, ce sa zic, nu te cunosc foarte bine, insa imi pare rau sa aud ca sa mai lasat cine de scripting din cauza noi generatii ...
  20. R39-5 ultima cred, multumesc pentru ajutor ! T/C.
  21. Problema intalnita (descriere): Nu reusesc sa generez numarul de rezultate din mysql_queryEro(area / rile) / warning-(ul / urile): Nu sunt eroriLiniile de cod / sursa / script-ul(obligatoriu): stock CheckJobWorker(jID) { new query[128], rows, fields; format(query, sizeof(query), "SELECT COUNT(*) FROM `users` WHERE `Job` = '%d'", jID); mysql_query(SQL, "SELECT COUNT(*) FROM `users` WHERE `Job` = 1", true); cache_get_data(rows, fields, SQL); printf("%d | %d workers", rows, fields); return 0; } Imagini / Video (optional): - Ati incercat sa rezolvati singur?: - Ma bat cu codul de 30 minute, in phpmyadmin imi arata la select 7, in gm imi genereaza 1..
×
×
  • 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.