Jump to content

BaFFyJunior

Membru
  • Posts

    240
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by BaFFyJunior

  1. Foloseste siteul oficial: https://www.rotld.ro/home/
  2. Poti pune intr-un timer o data/secunda sau nu stiu, o data la 10 secunde... o data pe minut, cum vrei tu, cu foreach sa verifice daca jucatorul are destule rp pentru level up si sa ii dea level up. Exemplu: foreach(new i: Player) { if(PlayerInfo[i][pRP] == PlayerInfo[i][pRPNecesar]) { PlayerInfo[i][pLevel] ++; //aici mai pui ce completari vrei tu, inlocuiesti cu ce variabile ai tu in gamemode. } } Nu am scriptat pe gamemode rpg de multa vreme, nu mai stiu exact cum se numesc variabilele Pe langa asta, difera de la server la server. Inlocuieste cu ce ai tu si cu ce verificari mai vrei, mai sus ai un exemplu teoretic. Sper ca ai inteles.
  3. Foloseste functia ProxDetector. La OnPlayerText unde trimite mesajul sterge SendClientMessageToAll sau foreach sau ce folosesti si pune ProxDetector. function ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5) { new Float:posx, Float:posy, Float:posz; new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); foreach(new i: Player) { if(GetPlayerInterior(playerid) == GetPlayerInterior(i) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)) { GetPlayerPos(i, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); if(((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) SCM(i, col1, string); else if(((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) SCM(i, col2, string); else if(((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) SCM(i, col3, string); else if(((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) SCM(i, col4, string); else if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) SCM(i, col5, string); } } return true; }
  4. In functie pui if(IsABike(vehicleid)) return 1; inainte de variabila combustibilului care scade sau poti face sa verifice daca e bike sa nu scada adica pui {}, iar cu else sa scada... cum vrei. Sper ca ai inteles.
  5. Ceea ce ai inceput e chiar foarte fain. Eu zic ca atat timp cat faci ceea ce iti place de ce nu?
  6. Alegi tabelul users din baza de date, apoi alegi de sus Structure, mergi jos si vei vedea add column after x.
  7. Am incercat cu Raduq si wefx. O sa incerc si cu ceilalti. Mersi!
  8. Salutari! Am un server de samp intitulat National Trucking. Avem o medie de 30 playeri on zilnic, hosted tab activ... parca tot nu este asa de bine. Totusi, nu ma pot plange. Stiti niste youtuberi care se ocupa de promovari? Eu am cautat, dar din pacate nu am primit niciun raspuns. O seara faina va doresc!
  9. Cu o functie simpla. stock GetRankAdmin( rank ) { new Rankname[ 55 ]; switch( rank ) { case 0: Rankname = "Player"; case 1: Rankname = "Junior-Admin"; case 2: Rankname = "Senior-Admin"; case 3: Rankname = "Head Admin"; case 4: Rankname = "Master-Admin"; case 5: Rankname = "Co-Fondator"; case 6: Rankname = "Fondator"; case 7: Rankname = "Scripter"; } return ( Rankname ) ; } O folosesti in sintaxa asa: GetRankAdmin(PlayerInfo[playerid][pAdmin]). Ex: new string[64]; format(string, sizeof(string), "%s %s a dat 15000$.", GetRankAdmin(PlayerInfo[playerid][pAdmin]), GetName(playerid)); Sper ca te-am ajutat.
  10. Incearca sa-mp addon. De asemenea, uita-te la anti aliasing si pune-l pe off in setari.
  11. BaFFyJunior

    Server

    Compilezi cu pawno fisierele .pwn din filterscripts sau gamemodes. Da, fisierele le urci pe gamemode prin filezilla. Fisierele luat in considerare de host sunt cele de tip .amx.
  12. BaFFyJunior

    Server

    Ca host recomand ultra-h Germania. Ai nevoie de fillezilla pentru a urca fisierele pe host cu un cont ftp oferit de host... si pawno ca si compilator(poti folosi si zeex sau ce vrei tu). Daca contul e pe mysql si de o baza de date. Pe ultra-h e inclusa in pret.
  13. Inlocuieste functia RACtime din gm cu functia data de mine. De asemenea, verifica daca cOwned exista la enum cInfo. Daca tot primesti erori posteaza si linia erorii.
  14. Da, CarInfo. E ok ce ti-am dat eu.
  15. Verifica mysql_log. new query[180]; if(adminlevel >= 1) format(query, sizeof(query), "UPDATE users SET `Security`='%s', `HelpedPlayers`='0', `Admin`='%d' WHERE `id`='%d'", MD5_Hash(DEFAULT_PASSWORD), adminlevel, userid); else format(query, sizeof(query), "UPDATE users SET `AW`='0', `Admin`='0' WHERE `id`='%d'", userid); mysql_query(SQL, query);
  16. Da, in gamemode unde vrei. Dar sa inlocuiesti CarInfo cu variabilele pe care le folosesti tu la tine in gamemode.
  17. CMD:rac(playerid, params[]) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 3) { SendClientMessage(playerid, COLOR_ERROR, AdminOnly); return 1; } new string[256], sendername[30]; SetTimer("RACtime", 10000, 0); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string,sizeof(string),"{FFFFFF}All unused cars will be respawned in {009999}10 {FFFFFF}seconds by %s!", sendername); SendClientMessageToAll(COLOR_WHITE,string); } return 1; function RACtime() { for(new vid = 0, j = GetVehiclePoolSize(); vid < j; vid++) { if(CarInfo[vid][cOwned] == 0 && !IsVehicleInUse(vid)) SetVehicleToRespawn(vid); } return 1; }
  18. function Copcar2(carid) { if(GetVehicleModel(carid) == 497 || GetVehicleModel(carid) == 599 || GetVehicleModel(carid) == 598 || GetVehicleModel(carid) == 597 || GetVehicleModel(carid) == 596) { return 1; } return ( 0 ); } Poti face ceva de genul.
  19. Deci... Daca nu ma insel in loc de pInfo[playerid][pName] ar trebui sa folosesti PlayerInfo[playerid][pName], astfel: GetPlayerName(playerid, PlayerInfo[playerid][pName], MAX_PLAYER_NAME); Tu ai enumerate niste variable in arrayul pInfo, iar variabila PlayerInfo le foloseste pe cele din pInfo. Sper ca ai inteles.
  20. format(string,sizeof(string),"UPDATE `users` SET `SummerBonus` = '1 WHERE `name` = '%s'",PlayerName); mysql_query(string); if(PlayerInfo[playerid][pSummerBonus] == 1) return SCM(playerid, -1, "Acest bonus poate fii folosit o singura data!"); // aici verifica daca summerbonus este = cu 1. Probabil ca sa interzici vrei sa pui 0. Asa ca pur si simplu inlocuiesti treaba. Pui 0 in loc de 1. Si in comanda adauga la final: PlayerInfo[playerid][pSummerBonus] = 0;
  21. Posteaza server_log aici. Sau mai bine fa un fisier pawn.cfg, scrie in el -d3 compileaza gm si porneste serverul, apoi posteaza server_log.
×
×
  • 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.