Jump to content

[RW]Robi

Membru
  • Posts

    292
  • Joined

  • Last visited

  • Days Won

    12

Community Answers

  1. [RW]Robi's post in PROBLEMA STUNT was marked as the answer   
    new vid = GetVehicleModel(GetPlayerVehicleID(playerid));
  2. [RW]Robi's post in Problema salvare variabila was marked as the answer   
    Hai ca ai noroc, mi-a venit o idee acum.
    new ora,minute,secunde; gettime(ora, minute, secunde); if(ora == 0) { new sqlupdate[256],sqlcheck[512]; mysql_format(SQL, sqlcheck, sizeof(sqlcheck), "SELECT * FROM `users` ORDER BY `ID`"); new Cache: jucatori = mysql_query(SQL, sqlcheck); for(new i = 0, c = cache_get_row_count(); i < c; i++) { new id = cache_get_field_content_int(i, "ID"); new value = random(10); mysql_format(SQL, sqlupdate, sizeof(sqlupdate), "UPDATE `users` SET `NumeColumn`='%d' WHERE `ID`='%d'",value,id); mysql_tqueyr(SQL, sqlupdate, "", ""); } cache_delete(jucatori); }  
  3. [RW]Robi's post in Problemea salvare clan was marked as the answer   
    Incarca pe pastebin, dai edit, am scris sintaxa sql gresita. 
    Asta e cea buna:
    if(gPlayerLogged[playerid] > 0) { new sqlupdate[512]; mysql_format(SQL, sqlupdate, sizeof(sqlupdate), "UPDATE `users` SET `Clan`='%d',`ClanRank`='%d' WHERE `id`='%d'",PlayerInfo[playerid][pClan],PlayerInfo[playerid][pClanRank],PlayerInfo[playerid][pSQLID]); mysql_tquery(SQL, sqlupdate, "", ""); }
  4. [RW]Robi's post in Problema /dsremove was marked as the answer   
    CMD:dsremove(playerid, params[]) { if(IsPlayerConnected(playerid)) { if(playerVariables[playerid][pAdminLevel] < 6) return S(playerid, -1, AdminOnly); new id, queryString[256], string[256],eroare = 0,idv; if(sscanf(params, "i", id)) return S(playerid, COLOR_GREY, "Syntax: {FFFFFF}/dsremove [model]"); mysql_format(handle, queryString, sizeof(queryString), "SELECT * FROM `stock` WHERE `Model`='%d'",id); new Cache: verificare = mysql_query(handle, queryString); eroare = cache_get_row_count(); if(eroare > 0) { for(new i = 0; i < eroare; i++) { idv = cache_get_field_content_int(i, "ID"); } } cache_delete(verificare); if(eroare < 1) return SendClientMessage(playerid, -1, "Acest model de vehicul nu exista in baza de date."); Stock[idv][vPrice] = -1; mysql_format(handle, queryString, sizeof(queryString), "DELETE FROM stock WHERE `Model` = '%d'", id); mysql_tquery(handle, queryString, "", ""); format(string, sizeof(string), "{F0DF52}/dsremove: Owner %s removed car %d (%s) from the DS.", GetName(playerid), id, VehicleNames[id - 400]); submitToAdmins(string, -1); incarcarestock = 3; } return 1; } Poftim, acum va trebuii sa functioneze.
  5. [RW]Robi's post in Problema, lag infernal 180+ de jucatori was marked as the answer   
    solved
     
    Edit: a fost de la operatiile mysql, si poate de la variabila MAX_PLAYERS setata pe 1000, oricum multumesc tuturor!
×
×
  • 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.