Jump to content

CRISS

Membru
  • Posts

    32
  • Joined

  • Last visited

    Never

Everything posted by CRISS

  1. Sa iti spun ce ai gresit: ori nu ai pus bine datele de la baza de date mysql in gamemode(si serverul nu se poate conecta la mysql) , ori nu ai dat import bine la baza de date(si nu ai tabelele creeate bine).
  2. Nume: CRISS Nume tutorial: Scapare Lag server SAMP HOSTAT ! Descriere: De cand am deschis serverul meu de samp pe host(acum cateva zile) am un lag imens pe server...playerii apar uneori AFK, se blocheaza serverul la /rac, pe unii ii scoate de pe server cu mesajul acela "Lost Connection to the Server. Retrying...", e un lag foarte mare, si nu stiu cum sa scap de el. Va rog mult sa ma ajutati. Va multumesc anticipat.
  3. De cand mi-am deschis serverul de SAMP pe host(acum cateva zile) este lag intr-una..playerii apar de mai multe ori AFK(toti) si dureaza 5 sec pana isi revine, se blocheaza uneori la /rac, numai merge bine chatul(scrii cv si dureaza 10+ sec pana apare in chat), este lag fff mare; si daca dau restart dupa aprox 1 ora iar incepe..Va rog mult sa ma ajutati ! Multumesc anticipat !
  4. Mersi, am rezolvat. Rog un Moderator sa dea T/C , problema rezolvata.
  5. =)))))))))))))))))))))))))))) Orice gm e in format .pwn .....Draven se refera daca gm'ul ruleaza e MySQL, adica utilizeaza o baza de date. Comanda tot in gm se baga..
  6. Logic, cum a spus si Adrian, trebe doar scoasa linia: [pawn]SetPlayerColor(playerid, 0xFFFFFFFF);[/pawn] Aceasta functie seteaza culoarea numelui pe TAB: //SetPlayerColor(playerid, [culoare])
  7. Wow wow wow stati putin cu setarile...serverul il vezi on in lista de servere la SAMP nu? Si ti se inchide serverul(acea consola) automat cand intri pe el? 80% ca problema este urmatoarea: serverul ruleaza pe MySQL si tu nu ai baza de date..atunci logic ca nu are unde se salva si de unde se citi conturile...(Aceasta este parerea mea cel putin). Astept un reply daca aceasta este sau nu problema.
  8. Am avut aceeasi eroare..este foarte simplu: In "server.cfg" te duci la linia "plugins" si la fiecare plugin sa pui la final .so (daca srv e pe host). Ex: mysql.so , sscanf.so ETC... Sper sa-ti fie de folos! Succes!
  9. Am doar o singura intrebare: cand pun serverul pe host (acesta ruleaza pe mysql), libraria mysql trebuie sa aiba denumirea "libmysqlclient.so.15" sau "libmysqlclient_r.so.15" ? Multumesc anticipat!
  10. Uite aici: [pawn]if(strcmp(cmd, "/skinrange", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 1) // sa fie doar pentru admini { new dist; // variabila pentru distanta tmp = strtok(cmdtext, idx); dist = strval(tmp); if(dist < 1) { SendClientMessage(playerid, COLOR_LIGHTRED, "USAGE: {FFFFFF}/skinrange [range] [skin]"); return 1; } if(dist > 100) // distanta maxima sa fie de 100m { SendClientMessage(playerid, COLOR_LIGHTRED, "* Distanta maxima este de 100 metri !"); return 1; } new skin; // variabila pt skin tmp = strtok(cmdtext, idx); skin = strval(tmp); new acpl; // variabila pentru numaratoare GetPlayerName(playerid, sendername, sizeof(sendername)); // aflarea numelui care executa comanda for(new [censured by the system] = 0; [censured by the system] < MAX_PLAYERS; [censured by the system]++) { acpl++; new Float:x,Float:y,Float:z; GetPlayerPos(playerid, x,y,z); if(PlayerToPoint(dist, [censured by the system],x,y,z)) { SetPlayerSkin([censured by the system], skin); format(string, sizeof(string), "[skinRange]: Admin %s ti'a setat skin'ul cu ID %d", sendername, skin); SendClientMessage([censured by the system], COLOR_WHITE, string); } } format(string, sizeof(string), "AdmInfo: {FFFFFF}Admin %s a folosit comanda /skinrange(actionata pe %d playeri).", sendername, acpl); ABroadCast(COLOR_LIGHTRED, string, 1); } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "Error: {FFFFFF}Nu esti autorizat sa folosesti aceasta comanda !"); return 1; } } return 1; }[/pawn] Sper sa'ti foloseasca ! Succes !
  11. Foloseste comanda /setadmin, /makeadmin , depinde cum ai tu...sau din ftp scriptfiles -> numecont (ex: scriptfiles -> CRISS) sau scriptfiles -> Users -> NumeCont (ex: scriptfiles -> Users -> CRISS)
  12. Nu vad cum Dumnezeu se poate asa ceva..e prima oare cand aud asa ceva si nu imi vine sa cred...inseamna ca ai pus din greseala ceva chiar sub "public OnPlayerCommandText", ca altfel nu imi pot inchipui din ce cauza ar fi...
  13. CRISS

    Problema

    Trebuie sa fie undeva la [pawn]public OnPlayerEnterVehicle[/pawn]
  14. Ma, sus e pusa comanda "/barrier". Tu ai spus ca bariera nu se deschide cu /barrier, ci se deschide cu ALTA comanda, acea comanda am zis eu sa o pui pe forum.
  15. CRISS

    Problema

    Incearca asa: [pawn]public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp("/radioinfo", cmdtext, true, 10) == 0) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "~=~=~=~=~=~=~=~=~=~= Radio Information [RO] ~=~=~=~=~=~=~=~=~=~="); SendClientMessage(playerid, COLOR_WHITE, "Daca vrei sa asculti radio, scrie /radioon"); SendClientMessage(playerid, COLOR_WHITE, "Daca vrei sa opresti radio, scrie /radiooff"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "~=~=~=~=~=~=~=~=~=~= Radio Information [ENG] ~=~=~=~=~=~=~=~=~=~="); SendClientMessage(playerid, COLOR_WHITE, "If you want to listen radio, type /radioon"); SendClientMessage(playerid, COLOR_WHITE, "If you want to stop radio, type /radiooff"); return 1; } if (strcmp("/radiooff", cmdtext, true, 10) == 0) { StopAudioStreamForPlayer(playerid); SendClientMessage(playerid, 0xAA3333AA, "RO: Ai oprit radioul."); SendClientMessage(playerid, 0xAA3333AA, "ENG: You have stopped the radio."); return 1; } if (strcmp("/radioon", cmdtext, true) == 0) { PlayAudioStreamForPlayer(playerid, "http://stream.playmusicfm.info:9000/"); SendClientMessage(playerid, 0xFFFFFFAA, "Type /Radio off to stop audio streaming."); return 1; } return 0; }[/pawn] Acele if'uri si parantezele " { " sau " } " trebe sa fie alianite corect, una sub alta..deci ai grija la TAB'uri.
  16. Uite aici o comanda /arrest care functioneaza: [pawn]if(strcmp(cmd, "/arrest", true) == 0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == 2 || IsACop(playerid)) { if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1) { SendClientMessage(playerid, COLOR_GREY, " You are not on Duty!"); return 1; } if(!PlayerToPoint(6.0, playerid, 268.3327,77.8972,1001.0391)) {// Jail spot SendClientMessage(playerid, COLOR_GREY, " You are not near the Jail, can not Arrest !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } moneys = strval(tmp); if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, " Jail Price can not be below $1 or above $99999 !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } new time = strval(tmp); if(time < 1 || time > 20) { SendClientMessage(playerid, COLOR_GREY, " Jail Time Minutes can not be below 1 or above 20 (Take the person to prison then) !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } new bail = strval(tmp); if(bail < 0 || bail > 1) { SendClientMessage(playerid, COLOR_GREY, " Jail Bailing can not be below 0 or above 1 !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } new bailprice = strval(tmp); if(bailprice < 0 || bailprice > 3000000) { SendClientMessage(playerid, COLOR_GREY, " Jail Bailing can not be below $0 or above $3000000 !"); return 1; } new suspect = GetClosestPlayer(playerid); if(IsPlayerConnected(suspect)) { if(GetDistanceBetweenPlayers(playerid,suspect) < 5) { GetPlayerName(suspect, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(WantedLevel[suspect] < 1) { SendClientMessage(playerid, COLOR_GREY, " Player must be at least Wanted Level 1 !"); return 1; } format(string, sizeof(string), "* You arrested %s !", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); GivePlayerMoney(suspect, -moneys); format(string, sizeof(string), "arrested by %s ~n~ for $%d", sendername, moneys); GameTextForPlayer(suspect, string, 5000, 5); ResetPlayerWeapons(suspect); if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1) { format(string, sizeof(string), "<< Officer %s arrested suspect %s >>", sendername, giveplayer); OOCNews(COLOR_LIGHTRED, string); } else if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2) { format(string, sizeof(string), "<< FBI Agent %s arrested suspect %s >>", sendername, giveplayer); OOCNews(COLOR_LIGHTRED, string); } else if(PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3) { format(string, sizeof(string), "<< Soldier %s arrested suspect %s >>", sendername, giveplayer); OOCNews(COLOR_LIGHTRED, string); } SetPlayerInterior(suspect, 6); SetPlayerPos(suspect,264.6288,77.5742,1001.0391); PlayerInfo[suspect][pJailTime] = time * 60; if(bail == 1) { JailPrice[suspect] = bailprice; format(string, sizeof(string), "You are jailed for %d seconds. Bail: $%d", PlayerInfo[suspect][pJailTime], JailPrice[suspect]); SendClientMessage(suspect, COLOR_LIGHTBLUE, string); } else { JailPrice[suspect] = 0; format(string, sizeof(string), "You are jailed for %d seconds. Bail: Unable", PlayerInfo[suspect][pJailTime]); SendClientMessage(suspect, COLOR_LIGHTBLUE, string); } PlayerInfo[suspect][pJailed] = 1; PlayerInfo[suspect][pArrested] += 1; SetPlayerFree(suspect,playerid, "Got Arrested"); WantedPoints[suspect] = 0; WantedLevel[suspect] = 0; WantLawyer[suspect] = 1; }//distance }//not connected else { SendClientMessage(playerid, COLOR_GREY, " No-one close enough to arrest."); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a Cop / FBI / National Guard !"); return 1; } }//not connected return 1; }[/pawn]
  17. Arata'mi comanda cu care se deschide bariera...
  18. Comanda /wanted: [pawn]if(strcmp(cmd, "/wanted", true) == 0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == 2 || IsACop(playerid)) { new x; SendClientMessage(playerid, COLOR_GREEN, "Current Wanted Suspects:"); for(new i=0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(WantedLevel > 1) { GetPlayerName(i, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "%s%s: %d", string,giveplayer,WantedLevel); x++; if(x > 3) { SendClientMessage(playerid, COLOR_YELLOW, string); x = 0; format(string, sizeof(string), ""); } else { format(string, sizeof(string), "%s, ", string); } } } } if(x <= 3 && x > 0) { string[strlen(string)-2] = '.'; SendClientMessage(playerid, COLOR_YELLOW, string); } } else { SendClientMessage(playerid, COLOR_GREY, " You're not a Cop / FBI / National Guard !"); } }//not connected return 1; }[/pawn]
  19. CRISS

    Problema bail

    Sincer nu vad de ce nu ti'ar merge...Comanda este pusa la "public OnPlayerCommandText", iar gamemode'ul compilat ? PS: Nu se intampla chiar nimic ? nu trimite un mesaj, nimic ?
  20. Nu trebuie sa ne dai gm'ul, doar sa urmezi sfaturile date in acest topic. Fa exact cum ti'a spus Mafia si iti va merge(pune "PlayerInfo" in loc de "PlayerData").
  21. Nu am inteles, care este problema ? nu iti deschide bariera ?
  22. CRISS

    Anti C-Bug

    Foare folositor, bravo! Da Abramovic mai este aceasta problema.
  23. Banii la PayDay sunt dati in functie de variabila "PlayerInfo[pPayCheck]" , deci cauta in gamemode liniile unde se seteaza "pPayCheck" la playeri si modifica de acolo. Culorile membrilor de la factiuni: Folosesti functia [pawn]SetPlayerToTeamColor(playerid, )[/pawn] Daca ai un public se parat, cum ar fi "public SetPlayerToTeamColor", pui acolo functia aceasta. Daca nu, o pui sub "public OnPlayerSpawn". Cu aceasta functie, setezi la fiecare factiune culoarea membrilor. De ex: [pawn]if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetPlayerToTeamColor(playerid, ); } else if.....[/pawn] Si faci tot asa pt toate factiunile dorite.
  24. Deci, ma poate ajuta cineva va rog ?
  25. Codul corect: [pawn]while ((idx < lenth) && cmdtext[idx] <= ' '))[/pawn]
×
×
  • 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.