Jump to content

Cosmarul

Membru
  • Posts

    17
  • Joined

  • Last visited

Everything posted by Cosmarul

  1. Salutare, daca deschid serverul de samp pe un server dedicat am 50% din ticks, daca pe PC-ul normal am 200 ticks pe dedicat am maxim 100-105, ce as putea sa fac? Mentionez ca la dedicat am un procesor mult mai bun fata de cel care il am la PC si dubla memorie RAM. Am sistem de operare Windows Server 2012 pe dedicat. Multumesc anticipat.
  2. Salutare, de curand am implementat sistemul de vehicule de pe LimitCS pe un Gamemode facut de TheSpy... Tot sistemul merge bine in afara de partea cu despawnare... Cand un jucator da /q se despawneaza doar un singur vehicule dintre cele spawnate... De exemplu el are 10 vehicule spawnate, da /q si se despawneaza doar 1... 9 vehicule raman aiurea pe server.... Cod sursa: pastebin.com/WWXYXsre Multumesc anticipat.
  3. Multumesc derecomandare, am rezolvat, m-am folosit de "status" daca este setat online din vaza de date, il arata online, daca nu, nu.
  4. stock ShowPlayerFriends(playerid) { new szDialog[1024], szDialog2[1024], szQuery[256], szTitle[256], szString[256], x, onf; format(szQuery, sizeof(szQuery), "SELECT * FROM `friends` WHERE `AddBy` = '%d'", PlayerInfo[playerid][pSQLID]); new Cache: result = mysql_query(SQL, szQuery); for(new i, j = cache_get_row_count (); i != j; ++i) { cache_get_field_content(i, "friendName", szString); format(Selected[playerid][x], MAX_PLAYER_NAME, szString); { onf++; if(x == 0) format(szDialog, sizeof(szDialog), "Add Friend...\n{13E300}%s (%d){FFFFFF}\n", szString, userID); else format(szDialog, sizeof(szDialog), "{13E300}%s (%d){FFFFFF}\n", szString, userID); strcat(szDialog2, szDialog); } else { if(x == 0) format(szDialog, sizeof(szDialog), "Add Friend...\n{FF0000}%s{FFFFFF}\n", szString); else format(szDialog, sizeof(szDialog), "{FF0000}%s{FFFFFF}\n", szString); strcat(szDialog2, szDialog); } x++; } if(x == 0) { format(szDialog, sizeof(szDialog), "Add Friend..."); strcat(szDialog2, szDialog); } cache_delete(result); format(szTitle, sizeof(szTitle), "Online Friends: %d", onf); ShowPlayerDialog(playerid, DIALOG_FRIENDS, DIALOG_STYLE_LIST, szTitle, szDialog2, "Select", "Back"); return 1; } mai exact, cred ca asta este problema: new userID = GetPlayerID( szString ); if(userID != INVALID_PLAYER_ID)
  5. Problema intalnita (descriere): Poi, cred ca toti stiti gm-ul postat de Edison, cel asemanator b-zone, bun daca eu il adaug de exemplu pe "teste" la prieteni iar apoi isi face cineva cont cu numele "teste1" sau "teste2" sau "testea" etc, mie imi arata ca e online "teste".Ero(area / rile) / warning-(ul / urile): Nu primesc.Liniile de cod / sursa / script-ul(obligatoriu): Nu sunt sigur ce sa pun..Imagini / Video (optional):Ati incercat sa rezolvati singur?: Da.
  6. A mers, v-am dat un +1 pentru ajutor, multumesc.
  7. Tot nu merge, textdraw-ul cu SafeTD nu il am pe Max_players, cand incerc sa il pun imi da foarte multe erori.. new Text:SafeTD[1]; SafeTD[0] = TextDrawCreate(269.853546, 4.500005, "Safe-Zone"); TextDrawLetterSize(SafeTD[0], 0.573821, 1.844999); TextDrawAlignment(SafeTD[0], 1); TextDrawColor(SafeTD[0], 1509249535); TextDrawSetShadow(SafeTD[0], 0); TextDrawSetOutline(SafeTD[0], 1); TextDrawBackgroundColor(SafeTD[0], 255); TextDrawFont(SafeTD[0], 3); TextDrawSetProportional(SafeTD[0], 1); TextDrawSetShadow(SafeTD[0], 0);
  8. Problema intalnita (descriere): Poi, cand eu ma conectez intru in safe-zone, textdraw-ul apara si cand ies dispare, cum e si normal.. Dar daca se mai conecteaza un player, mie imi ramane activat textdrad-ul si doar celui care sa conectat ii mai dispare si apare textdraw-ul...Ero(area / rile) / warning-(ul / urile): nu primesc warninguri.Liniile de cod / sursa / script-ul(obligatoriu): forward SafeTimer(); public SafeTimer() { foreach(new i : Player) { new playerid; if(IsPlayerConnected(playerid) && gLogged[playerid] == 1) { for(new sf = 0; sf < MAX_SAFEZONES; sf++) { if(SafeZone[sf][szRange] >= 15) { if(PlayerToPoint(SafeZone[sf][szRange], i, SafeZone[sf][szX], SafeZone[sf][szY], SafeZone[sf][szZ]) && Showed[i] == 0) { Showed[i] = 1; SFID[i] = sf; TextDrawShowForPlayer(i, SafeTD[0]); return 1; } else if(!PlayerToPoint(SafeZone[SFID[i]][szRange], i, SafeZone[SFID[i]][szX], SafeZone[SFID[i]][szY], SafeZone[SFID[i]][szZ]) && Showed[i] == 1) { Showed[i] = 0; SFID[i] = 0; TextDrawHideForPlayer(i, SafeTD[0]); return 1; } } } } } return 1; } Imagini / Video (optional):Ati incercat sa rezolvati singur?: Da...
  9. Poti crea maxim 2, SetPlayerCheckpoint si SetPlayerRaceCheckpoint.
  10. Am incercat si asa dar tot nu merge. Scuze ca nu am raspuns mai repede.
  11. Am gasit: if(PlayerInfo[playerid][pAdmin] < 6) { if(OwnedVeh(vehicleid) != 0 && vInfo[OwnedVeh(vehicleid)][vLocked] == 1) { new Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, cx, cy, cz); SetPlayerPos(playerid, cx, cy, cz); } } Am adaugat: if(PlayerInfo[playerid][pAdmin] < 6 || !strcmp(vInfo[OwnedVeh(vehicleid)][vOwner], GetName(playerid), false)) Dar tot nimic.
  12. Nici asa nu merge, daca doresti iti dau link de la gm, poate gasesti functia potrivita..
  13. Nu exista functia OwnedVeh am incercat si cum ai zis tu mai sus si tot nu merge.
  14. Am incercat si asa dar tot nu merge, nu da erori dar in game nu merge sa urc in masina.
  15. Problema intalnita (descriere):Poi, vreau sa fac ca proprietarul masini sa poata intra in masina fara ca masina sa fie descuiata... dar nu prea merge. Eu am adaugat la functie codul "vInfo[OwnedVeh(vid)][vOwner] == GetName(playerid))". Ero(area / rile) / warning-(ul / urile): Toata Functia: if(OwnedVeh(vid) != 0) { new iMsg[128]; if(vInfo[OwnedVeh(vid)][vDestroyed] == 1 && !strmatch(vInfo[OwnedVeh(vid)][vOwner], "Unbought") && OdoVehicle(GetVehicleModel(vid)) == 1) { if(strmatch(vInfo[OwnedVeh(vid)][vOwner], GetName(playerid))) { new insurance = 100 + floatround(vInfo[OwnedVeh(vid)][vKm]); format(iMsg, sizeof(iMsg), "This vehicle is damaged.\nYou need to pay $%s.", FormatNumber(insurance)); ShowPlayerDialog(playerid,DIALOG_INS,DIALOG_STYLE_MSGBOX,"INSURANCE",iMsg,"Pay","Exit"); TogglePlayerControllableEx(playerid, false); } else { SendClientMessage(playerid, COLOR_SYN2, "This vehicle is damaged, type /exit."); TogglePlayerControllableEx(playerid, false); } } else if(strmatch(vInfo[OwnedVeh(vid)][vOwner], GetName(playerid))) { format(iMsg, sizeof(iMsg), "Welcome to your vehicle, %s.", GetName(playerid)); SendClientMessage(playerid, COLOR_SYN2, iMsg); } else if(!strmatch(vInfo[OwnedVeh(vid)][vOwner], GetName(playerid))) { if(PlayerInfo[playerid][pAdmin] < 5 && vInfo[OwnedVeh(vid)][vLocked] == 1 || vInfo[OwnedVeh(vid)][vOwner] == GetName(playerid)) { SendClientMessage(playerid, COLOR_SYN2, "This vehicle is locked, type /exit."); TogglePlayerControllableEx(playerid, false); } else { format(iMsg, sizeof(iMsg), "This vehicle is owned by %s.", vInfo[OwnedVeh(vid)][vOwner]); SendClientMessage(playerid, COLOR_SYN2, iMsg); } } } Linia cu eroarea: if(PlayerInfo[playerid][pAdmin] < 5 && vInfo[OwnedVeh(vid)][vLocked] == 1 || vInfo[OwnedVeh(vid)][vOwner] == GetName(playerid)) Eroarea primita: error 033: array must be indexed (variable "GetName") Liniile de cod / sursa / script-ul(obligatoriu): Mai sus. Imagini / Video (optional): Ati incercat sa rezolvati singur?: Da. PS: Folosesc gm vProject.
×
×
  • 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.