Jump to content

BaFFyJunior

Membru
  • Posts

    240
  • Joined

  • Last visited

  • Days Won

    4

BaFFyJunior last won the day on May 6 2020

BaFFyJunior had the most liked content!

2 Followers

Profile Information

  • Sex
    Masculin
  • In-game Name
    BaFFy
  • Level of knowledge
    Mediu

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

BaFFyJunior's Achievements

Community Regular

Community Regular (8/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

22

Reputation

4

Community Answers

  1. Posteaza definirea variabilei DynamicFactions
  2. Pai tu verifici deja daca adminul care foloseste comanda are nivel 7... verifica daca nivelul e mai mare decat cel actual. if(level > pInfo[playerid][pAdmin]) return SendClientMessage(playerid, -1, "Nivel de acces invalid!");
  3. Incearca asa: OnPlayerEditDynamicObject(playerid, STREAMER_TAG_OBJECT objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz) sau OnPlayerEditDynamicObject(playerid, STREAMER_TAG_OBJECT:objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz);
  4. Redefineste LoginPTD... new PlayerText:LoginPTD[3][MAX_PLAYERS]; format(string, sizeof(string), "Name: %s", GetName(playerid)); PlayerTextDrawSetString(playerid, LoginPTD[0][playerid], string); PlayerTextDrawSetString(playerid, LoginPTD[1][playerid], "Password: ~b~click"); format(string, sizeof(string), "Last Login:~n~%s", laston); PlayerTextDrawSetString(playerid, LoginPTD[2[playerid]], string); for(new i = 0; i < 3; i++) PlayerTextDrawShow(playerid, LoginPTD[i][[playerid]); for(new i = 0; i < 2; i++) TextDrawShowForPlayer(playerid, LoginTD); SelectTextDraw(playerid, 0xFFFFF00FF); public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) { if(playertextid == LoginPTD[1][playerid]) { ShowPlayerDialog(playerid, DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD, "Login", "Insert your password in the dialog below!", "Login", "Quit"); return 1; } return 0; } Inlocuieste peste tot unde folosesti LoginPTD[numar] cu LoginPTD[numar][playerid].
  5. Deschide fisierul cu notepad ++/sublime text/orice editor text, includeul nu trebuie compilat, doar modificat si salvat, apoi compilat gamemodeul(fisierul .pwn din folderul gamemodes).
  6. Nu am inteles raspunsul... ai rezolvat problema sau inca exista?
  7. Ai pus pluginul de la mysql r41 in fisierul server.cfg la linia plugins? Pentru localhost foloseste extensia .dll, pentru host .so.
  8. Te salut! Ai aici un mic tutorial facut de Edison: Si pentru host este acelasi lucru, doar ca trebuie sa introduci datele de la baza de date a hostului in fisierul app.php. DB::$db['mysql'] = [ 'host' => 'hostname', 'username' => 'username', 'password' => 'password', 'dbname' => 'baza' ]; Pentru a urca panelul pe host trebuie sa cumperi un webhost si un domeniu. Cu ajutorul programului FileZilla poti incarca fisierele pe host, in folderul public_html.
  9. Uita-te in folderul logs - plugins - mysql_log si posteza aici daca sunt ceva erori.
  10. new bool:VehicleEngine[MAX_VEHICLES]; // definim variabila care verifica daca motorul este pornit sau nu. public OnPlayerStateChange(playerid, newstate, oldstate) { switch(newstate) { case PLAYER_STATE_DRIVER: // verificam daca jucatorul este intr-un vehicul { new vehicleid = GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective; // definim variabilele if(IsABike(vehicleid)) //verificam daca vehiculul in care e jucatorul este o bicicleta { GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective); // setam engine pe ON VehicleEngine[vehicleid] = true; } else { GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective); // setam engine pe OFF VehicleEngine[vehicleid] = false; } } } return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_SUBMISSION) // verificam daca jucatorul a apasat tasta 2 { if(IsPlayerInAnyVehicle(playerid)) { new vehicleid = GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective;//definim variabilele switch(VehicleEngine[vehicleid]) { case false: // daca motorul este oprit { GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective); // setam engine pe ON VehicleEngine[vehicleid] = true; SCM(playerid, -1, "Ai pornit motorul vehiculului."); } case true: // daca motorul este pornit { GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective); // setam engine pe OFF VehicleEngine[vehicleid] = false; SCM(playerid, -1, "Ai oprit motorul vehiculului."); } } } } return 1; } stock IsABike(vehicleid) { if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return 1; // vehiculul e bicicleta return 0; //vehiculul nu e bicicleta } Posibil sa mai fie loc de optimizari pe ici pe colo.
  11. Ia ultima versiune mscvr120.dll si pune-o in fisierul jocului. S-ar putea sa iti rezolve problema de la client. Pentru server, in server log iti spune ce se intampla: 13:09:48] Loading filterscript 'TDE.amx'... [13:09:54] [debug] Run time error 19: "File or function is not found" Verifica in folderul filterscripts de pe host(utilizand filezilla sau ce program folosesti pentru a urca fisierele pe host) daca exista fisierul TDE.amx. O a doua problema: [13:09:17] Loading plugin: TDE [13:09:17] Failed (plugins/TDE: cannot open shared object file: No such file or directory) Tu folosesti TDE editor pe host, hostul foloseste pluginuri cu extensia .so, nu dll. TDE are doar extensia .dll, astfel nu va fi recunoscut de catre host. Nu poti folosi TDE pe host, doar pe localhost.
  12. Posteaza server_log dupa momentul in care serverul cade. Sa vedem ce erori primesti.
  13. Trebuie indentate apasand TAB. Vezi in gamemode alte exemple. Incearca asa: switch(SERVER_HOSTSTATUS) { case 0: SQL = mysql_connect("", "", "", ""), print("Server: Oficial"); //SQL = mysql_connect("localhost", "root", "bhood", ""), print("Server: Oficial"); // mare case 1: SQL = mysql_connect("", "", "", ""), print("Server: Beta"); // beta case 2: SQL = mysql_connect("localhost", "root", "b-hood", ""), print("Server: localhost"); }
  14. Daca tot nu ti-a raspuns nimeni... probabil acel topic a fost sters.
  15. In ce functii sau conditii folosesti foreach? Ce versiune folosesti? Serverul e hostat sau localhost? Da-ne daca poti mai multe detalii despre problema ta.
×
×
  • 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.