Jump to content

BaFFyJunior

Membru
  • Content Count

    252
  • Joined

  • Last visited

  • Days Won

    4

BaFFyJunior last won the day on May 6

BaFFyJunior had the most liked content!

Community Reputation

22 Binişor

3 Followers

About BaFFyJunior

  • Rank
    Membru senior

Profile Information

  • Sex
    Masculin
  • Name in game
    BaFFy
  • Level of knowledge
    Mediu

Recent Profile Visitors

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

  1. 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].
  2. 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).
  3. Nu am inteles raspunsul... ai rezolvat problema sau inca exista?
  4. Ai pus pluginul de la mysql r41 in fisierul server.cfg la linia plugins? Pentru localhost foloseste extensia .dll, pentru host .so.
  5. 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.
  6. Uita-te in folderul logs - plugins - mysql_log si posteza aici daca sunt ceva erori.
  7. 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.
  8. 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.
  9. Posteaza server_log dupa momentul in care serverul cade. Sa vedem ce erori primesti.
  10. 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"); }
  11. Daca tot nu ti-a raspuns nimeni... probabil acel topic a fost sters.
  12. 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.
  13. YCMD:ban(playerid, params[], help) { if(!PlayerInfo[playerid][pAdmin]) return SCM(playerid, 0xa3e080FF, "You are not an admin!"); if(GetPVarInt(playerid, "ban_cooldown") > gettime()) return SendFormatMessage(playerid, COLOR_GREY, "You need to wait %d seconds for another ban.", (GetPVarInt(playerid, "ban_cooldown") - gettime())); new userID, days, reason[64]; if(sscanf(params, "uds[64]", userID, days, reason)) return SCM(playerid, -1, "Syntax: /ban <playerid/name> <days (0 = permanent)> <reason>"); if(days < 0) return SCM(playerid, -1, "Syntax: /ban <playerid/name> <days (0 = permanent)> <reason>"); if(!IsPlayerLogged(playerid)) return SCM(playerid, COLOR_GREY, "This player is not connected!"); if(userID == playerid) return SCM(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda aspura ta."); if(PlayerInfo[playerid][pAdmin] >= PlayerInfo[playerid][pAdmin] && !strmatch(GetPlayerNameEx(playerid), "R4uL")) return SCM(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda pe acel jucator."); banPlayer(userID, playerid, days, reason); return true; }
  14. Salutari! E foarte posibil sa fi gresit sectiunea. Stie cineva fostul gamemode reinforce? Oare cum as putea intra in posesia lui? Mi-a placut destul de mult acel gamemode.
×
×
  • Create New...

Important Information

This site uses cookies. By continuing browsing, you agree to the use of this information. For more details, see Terms of Use and Privacy Policy.