BaFFyJunior
-
Posts
240 -
Joined
-
Last visited
-
Days Won
4
Content Type
Profiles
Forums
News
Documentation
Posts posted by BaFFyJunior
-
-
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!");
-
Acum 19 ore, Filip Tesloianu a spus:
2930 public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rxx, Float:ryy, Float:rzz)
2931 {
PS: gamemodeul este buffls
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);
-
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].
-
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).
-
Nu am inteles raspunsul... ai rezolvat problema sau inca exista?
-
Ai pus pluginul de la mysql r41 in fisierul server.cfg la linia plugins? Pentru localhost foloseste extensia .dll, pentru host .so.
-
Acum 9 ore, Tavi@SUPREME a spus:
Am panelul burned, cum trebuie configurat?
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.
-
Acum 16 minute, datonato a spus:
Salutare, recent am inceput sa lucrez la un gamemode de la 0 termin totul am 0 erori / 0 warnings.
Cand intru pe joc, ma inregistrez etc. dupa dau un ochi in baza de date intre timp am dat restart la server sa vad daca merge logarea. Pe mine ma dadea tot la inregistrare, iar in baza de date nimic niciun cont.
Tin sa precizez ca am mai avut probleme de genul acesta si nu se insera in baza de date acea valoare.
Folosesc MYSQL R41-4 aveti vreo idee de ce nu se insereaza ?
Codul ( mai sunt si altele, dar nu imi insereaza numele si parola deloc, iar celelalte la fel)
gQuery[0] = EOS;
mysql_format(SQL, gQuery, sizeof(gQuery), "INSERT INTO `users` (`Name, `Password`) VALUES ('%s', '%s')", NumePlayer(playerid), inputtext);
mysql_pquery(SQL, gQuery, "insereazaCont", "i", playerid);Va multumesc anticipat
Uita-te in folderul logs - plugins - mysql_log si posteza aici daca sunt ceva erori.
-
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.
-
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.
-
Posteaza server_log dupa momentul in care serverul cade. Sa vedem ce erori primesti.
-
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");}
-
Daca tot nu ti-a raspuns nimeni... probabil acel topic a fost sters.
- 1
-
La 29.05.2020 la 20:44, Alexandru Alex a spus:
Salut, am bagat pe gamemode-ul meu foreach si serverul cand il deschid imi da crash incontinu.
[debug] Server crashed due to an unknown error [debug] Native backtrace: [debug] #0 00403334 in ?? () in samp-server.exe [debug] #1 00403684 in ?? () in samp-server.exe [debug] #2 004912c7 in ?? () in samp-server.exe [debug] #3 0048d4db in ?? () in samp-server.exe [debug] #4 0049b4a1 in ?? () in samp-server.exe [debug] #5 0049b4b1 in ?? () in samp-server.exe [debug] Registers: [debug] EAX: 00003478 EBX: 00000000 ECX: 00001242 EDX: 02b796f8 [debug] ESI: 02cc87a0 EDI: 00000061 EBP: 0049b4a1 ESP: 0019fe88 [debug] EIP: 0049b4b1 EFLAGS: 00010297 [debug] Stack: [debug] ESP+00000000: 004ab4a0 0019ff60 004ab0e1 ffffffff [debug] ESP+00000020: 00000094 00000006 00000002 000023f0 [debug] ESP+00000040: 00000000 00000000 00000000 00000000 [debug] ESP+00000060: 00000000 00000000 00000000 00000000 [debug] ESP+00000080: 00000000 00000000 00000000 00000000 [debug] ESP+000000a0: 00000000 00000000 00000000 00000000 [debug] ESP+000000c0: 00000000 00000000 c0000005 00000000 [debug] ESP+000000e0: 004ba530 00000000 0019ff80 74bf0419 [debug] ESP+00000100: 0020e000 bc9dfd4c 00000000 00000000 [debug] ESP+00000120: 00000000 00000000 00000000 00000000 [debug] ESP+00000140: 00000000 0019ffe4 772e86e0 cbb39050 [debug] ESP+00000160: 772f51c1 00000000 00000000 0049cb3a [debug] ESP+00000180: 00000001 00003334 000000dc 00000000 [debug] ESP+000001a0: 00000007 00000034 0000017c 00000001 [debug] ESP+000001c0: 00000000 00000002 1a26ef4e 00000298 [debug] ESP+000001e0: f33271ba 00000540 0000004a 0000058c [debug] ESP+00000200: 00000032 00000908 00000300 00000000 [debug] ESP+00000220: 00000336 00000000 38505fc8 00000f84 [debug] ESP+00000240: b1280544 0000134c 00000056 000013a4 [debug] ESP+00000260: 00000002 00000001 0000017c 000015f8 [debug] ESP+00000280: 00000001 00000003 00001f14 00000e8c [debug] ESP+000002a0: 00000002 00000005 000030b4 00000098 [debug] ESP+000002c0: 00000002 00000007 00003218 000000f0 [debug] ESP+000002e0: 00000002 0000000b 00003330 00000004 [debug] ESP+00000300: 00000001 00000001 00000006 0000008c [debug] ESP+00000320: 0000005e 00000000 00000000 00000000 [debug] ESP+00000340: 00000000 00000000 00000002 00000024 [debug] ESP+00000360: 006e0069 006f0064 00730077 0057005c [debug] ESP+00000380: 1a26ef4e 0000011c 00000044 00000164 [debug] ESP+000003a0: 0000004a 00000410 00000348 00000002 [debug] ESP+000003c0: 00000300 00000003 32ceeacd 00000a8c [debug] ESP+000003e0: 38505fc8 00000e08 0000005e 00000e68 [debug] Loaded modules: [debug] 00400000 - 00519000 samp-server.exe [debug] 77270000 - 7740c000 ntdll.dll [debug] 74bd0000 - 74cb0000 KERNEL32.DLL [debug] 756f0000 - 758ea000 KERNELBASE.dll [debug] 75e60000 - 763b3000 SHELL32.dll [debug] 74eb0000 - 74f70000 msvcrt.dll [debug] 75bb0000 - 75beb000 cfgmgr32.dll [debug] 75bf0000 - 75d12000 ucrtbase.dll [debug] 753b0000 - 75439000 shcore.dll [debug] 76980000 - 76a3f000 RPCRT4.dll [debug] 748d0000 - 748f0000 SspiCli.dll [debug] 748c0000 - 748ca000 CRYPTBASE.dll [debug] 749e0000 - 74a42000 bcryptPrimitives.dll [debug] 75440000 - 754b9000 sechost.dll [debug] 74fa0000 - 75217000 combase.dll [debug] 76a90000 - 7708e000 windows.storage.dll [debug] 75a90000 - 75b10000 msvcp_win.dll [debug] 75b30000 - 75bae000 advapi32.dll [debug] 756c0000 - 756dc000 profapi.dll [debug] 75660000 - 756b4000 powrprof.dll [debug] 76a40000 - 76a84000 shlwapi.dll [debug] 752b0000 - 752d3000 GDI32.dll [debug] 763c0000 - 76526000 gdi32full.dll [debug] 74d10000 - 74ea9000 USER32.dll [debug] 752e0000 - 752f7000 win32u.dll
si am crash detecotr
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.
-
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; }
-
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.
-
Gasesti Aici.
-
Pune params in loc de params[]. Cat despre celelalte erori daca nu se rezolva asa o sa ma uit cand intru pe calculator.
-
format(string, sizeof(string), "{Notice}:{FF0000} Adminul %s {FFFFFF}este acum {FF0000}on duty", GetName(playerid));
-
stock GetDateTime() { new zStr[ 30 ], liDate[ 6 ]; getdate( liDate[ 0 ], liDate[ 1 ], liDate[ 2 ] ); gettime( liDate[ 3 ], liDate[ 4 ], liDate[ 5 ] ); format( zStr, 30, "%02d:%02d %02d/%02d/%d", liDate[ 3 ], liDate[ 4 ], liDate[ 2 ], liDate[ 1 ], liDate[ 0 ] ); return zStr; }
mysql_format(SQL, gQuery, sizeof gQuery, "INSERT INTO `users` (Name, Password, RegisterDate, LastLogin) VALUES ('%e', '%e', '%e', '%e')", GetPlayerNameEx(playerid), inputtext, GetDateTime(), GetDateTime());
-
Acum 20 minute, NuamNume a spus:
Ar fii fost bine, oricum o rezolv eu. Multumesc inca o data!
La default poti pune CURRENT_TIMESTAMP.
-
Acum 1 minut, NuamNume a spus:
nu cred brooo merge mersi din tot sufletul meu iti raman dator dar trebuie sa mai adaug ceva? ca gen scrie last login 000-000-000 ceva de genu
Nu, campul se actualizeaza la inregistrare.
-
Chiar acum, NuamNume a spus:
tot de tip date?
Da
-
Creeaza o coloana numita RegisterDate in tabelul users a bazei tale de date de tip date.
Eroare in SA-MP dedicated server
in Ajutor Scripting
Posted
Posteaza definirea variabilei
DynamicFactions