Jump to content

Rayan

Membru
  • Posts

    198
  • Joined

  • Last visited

Everything posted by Rayan

  1. Cand jucatorul nu este pe un turf spune ca Comanda nu exista, insa in comanda e pusa ca daca jucatorul nu se afla pe niciun turf sa ii zica "You are not on a turf". insa inloc sa scrie asta, scrie ca SERVER: Unknown Command. Cine stie cum sa rezolv poate posta aici, multumesc! CMD:attack(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first."); new hour,minn,sec,y,m,d; gettime(hour,minn,sec); getdate(y,m,d); if(IsPlayerConnected(playerid)) { if(!IsAMember(playerid)) return SCM(playerid,COLOR_WHITE,"You are not a member of a mafia."); if(PlayerInfo[playerid][pRank] < 4) return SCM(playerid,COLOR_WHITE,"You don't have rank 4."); if(m == 12 && d == 25 || m == 12 && d == 26) return SS(playerid, COLOR_WHITE, "Nu poti folosi aceasta comanda pe 25 sau 26 decembrie.", "You can't use this command on 25 or 26 december."); if(m == 1 && d == 1 || m == 1 && d == 2) return SS(playerid, COLOR_WHITE, "Nu poti folosi aceasta comanda pe 1 sau pe 2 ianuarie.", "You can't use this command on 1 or 2 January."); //if(GetWeekDay() == 1 || GetWeekDay() == 4 || GetWeekDay() == 6) return SS(playerid, COLOR_WHITE, "War-ul este permis doar Luni, Miercuri, Vineri si Duminica.", "You can use this command only Monday, Wednesday, Friday and Sunday."); if(hour == 20 || hour == 21 || hour == 22 || hour == 23 || hour == 24) { new turf,faction,string[128],sendername[MAX_PLAYER_NAME]; for(new i = 1; i <= sizeof(TurfInfo); i++) { if(IsPlayerInTurf(playerid, i) == 1) { turf = i; break; } } GetPlayerName(playerid, sendername, sizeof(sendername)); if(turf == 0) return SCM(playerid, COLOR_WHITE, "You are not on a turf."); if(DeelayWar[PlayerInfo[playerid][pMember]] > 0) { format(string,sizeof(string),"(War) {FFFFFF}Your mafia can attack another turf in %d seconds.",DeelayWar[PlayerInfo[playerid][pMember]]); SendClientMessage(playerid, COLOR_GREEN, string); return 1; } faction = PlayerInfo[playerid][pMember]; if(TurfInfo[turf][zOwned] == faction) return SCM(playerid, COLOR_WHITE, "You can't attack your own turf."); if(WarInfo[turf][wAttacker] != 0) return SCM(playerid, COLOR_WHITE, "Turf is already attacked."); if(InWar[faction] == 1) return SCM(playerid, COLOR_WHITE, "You have an active war."); if(InWar[TurfInfo[turf][zOwned]] == 1) return SCM(playerid, COLOR_WHITE, "This mafia have active war."); new memberss; foreach(new i : Player) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pMember] == TurfInfo[turf][zOwned]) { memberss ++; } } } if(memberss < 1) return SCM(playerid, COLOR_WHITE, "This mafia don't have members online."); WarInfo[turf][wTime] = 1200; WarInfo[turf][wAttacker] = faction; WarInfo[turf][wFaction] = TurfInfo[turf][zOwned]; format(string,sizeof(string),"[TURF] %s from your group attacked turf %d (owned by %s).",sendername,turf,NumeFactiune(TurfInfo[turf][zOwned])); SendFamilyMessage(faction,COLOR_GREEN,string); format(string,sizeof(string),"[TURF] %s from %s attacked turf %d owned by you.",sendername,NumeFactiune(WarInfo[turf][wAttacker]),turf); SendFamilyMessage(TurfInfo[turf][zOwned],COLOR_GREEN,string); new Cache: abs = mysql_query(SQL, "SELECT * FROM wars"); new warid = cache_get_row_count() + 1; cache_delete(abs); format(string, sizeof(string),"[WAR] %s started a war with %s (war id: %d).",NumeFactiune(WarInfo[turf][wAttacker]),NumeFactiune(TurfInfo[turf][zOwned]),warid); ABroadCast(COLOR_ADMCOMMANDS,string,1); foreach(new i : Player) { if(PlayerInfo[i][pMember] == TurfInfo[turf][zOwned] || PlayerInfo[i][pMember] == WarInfo[turf][wAttacker]) { SetPlayerVirtualWorld(i, 1024); SS(i, COLOR_YELLOW, "Ai fost teleportat intr-un Virtual World unde sunt prezenti doar jucatorii ce participa la war.", "You have been teleported to a virtual world where only players participating in the war are present."); } } if(WarInfo[turf][wAttacker] == 4 || TurfInfo[turf][zOwned] == 4) { for(new x = 0; x < sizeof(VehicleInfo); x++) { if(VehicleInfo[x][vehGroup] == 4) { SetVehicleVirtualWorld(VehicleInfo[x][vehCarID], 1024); } } } if(WarInfo[turf][wAttacker] == 5 || TurfInfo[turf][zOwned] == 5) { for(new x = 0; x < sizeof(VehicleInfo); x++) { if(VehicleInfo[x][vehGroup] == 5) { SetVehicleVirtualWorld(VehicleInfo[x][vehCarID], 1024); } } } if(WarInfo[turf][wAttacker] == 6 || TurfInfo[turf][zOwned] == 6) { for(new x = 0; x < sizeof(VehicleInfo); x++) { if(VehicleInfo[x][vehGroup] == 6) { SetVehicleVirtualWorld(VehicleInfo[x][vehCarID], 1024); } } } if(WarInfo[turf][wAttacker] == 10 || TurfInfo[turf][zOwned] == 10) { for(new x = 0; x < sizeof(VehicleInfo); x++) { if(VehicleInfo[x][vehGroup] == 10) { SetVehicleVirtualWorld(VehicleInfo[x][vehCarID], 1024); } } } worstscoreat[turf] = 0; worstmemberat[turf] = 999; bestscoreat[turf] = 0; bestmemberat[turf] = 999; worstscoredf[turf] = 0; worstmemberdf[turf] = 999; bestscoredf[turf] = 0; bestmemberdf[turf] = 999; InWar[TurfInfo[turf][zOwned]] = 1; InWar[faction] = 1; waitwar[faction] = 60; } else return SS(playerid, COLOR_LIGHTGREEN3, "Poti folosi aceasta comanda doar intre orele 20:00 - 22:00.", "War must be between 20:00 and 22:00."); } return 1; }
  2. adaugi sub f(IsPlayerInTurf(playerid, i) == 1) { turf = i; break; } } asta if(turf == 0) return SendClientMessage(playerid, -1, "Nu esti pe turf.");
  3. Salut, am o problema, la OnPlayerGiveDamage, am aceasta functie, practic mesajul este trimis, insa jucatorul tot i se ia HP public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) { if(damagedid != INVALID_PLAYER_ID) { if(PlayerInfo[damagedid][pFreezeTime] != 0) { SendClientMessage(playerid, -1, "This player is frozen, you can't shoot him."); amount = 0; return 0; } } return 1; } Cum as putea rezolva sa nu ia ia HP?
  4. Bump, am observat ca problema apare cand am SetPlayerTeam(playerid,255) la OnPlayerSpawn, am incercat sa o sterg, si la fel, OnPlayerDeath e chemat de 2 ori, dar daca pun de exemplu: SetPlayerTeam(playerid,4); OnPlayerDeath nu mai e chemat de 2 ori, insa jucatorii nu pot sa isi ia damage fie Heli blade, fie cu grenadele (explozii) etc.. Stie cineva cum as putea rezolva? GM-ul wexgaming, un edit de la bigzone
  5. Da, am, la OnPlayerGiveDamage, insa am vazut in mai multe GM-uri care au in acest public, OnPlayerDeath si nu e chemat de 2 ori https://pastebin.com/rkkqwj9w
  6. Salut, cand un jucator moare OnPlayerDeath este chemat de 2 ori, habar nu am de ce. Am incercat sa sterg tot public-ul si sa las gol si la fel se intampla, practic e chemat de 2 ori. OnPlayerDeath aici https://pastebin.com/yVCXtCkd Ma poate ajuta cineva?
  7. Merge, multumes mult !
  8. @Daedric-Foxasa am facut, si nu se deschide nici pentru mine. e inchisa pentru toti, chiar si pentru muncitor.
  9. @Daedric-Fox am facut asta, insa am nevoie ca accesul la vehicul sa fie doar pentru jucatorul care munceste, pentru ceilalti masina sa fie incuiata.
  10. Am incercat, acum numai pune unlock la usile de la vehicul deloc, raman deschise...wtf Am pus asa in comanda /work foreach(new x : Player) { if(x != playerid) SetVehicleParamsForPlayer(pJobVehicle[playerid], x, 0, 1); } SetVehicleParamsForPlayer(pJobVehicle[playerid],playerid, 0, 0); si in onplayerconnect foreach(new ids : Player) { if(ids != playerid) SetVehicleParamsForPlayer(pJobVehicle[ids], playerid, 0, 1); }
  11. Am incercat, foreach(new i : Player) { if(i != playerid) SetVehicleParamsEx(JobVehicle[playerid],engine,lights,alarm,1,bonnet,boot,objective); } Insa problema e ca cauta jucatori in momentul acela, daca un jucator nou se conecteaza, lui nu ii se incuie masina pentru masina de job la playerid
  12. ---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7-R2, (C)2005-2015 SA-MP Team [19:06:12] filterscripts = "" (string) [19:06:12] [19:06:12] Server Plugins [19:06:12] -------------- [19:06:12] Loading plugin: Whirlpool [19:06:12] [19:06:12] ================== [19:06:12] [19:06:12] Whirlpool loaded [19:06:12] [19:06:12] ================== [19:06:12] [19:06:12] Loaded. [19:06:12] Loading plugin: mysql.dll [19:06:12] >> plugin.mysql: R39-6 successfully loaded. [19:06:12] Loaded. [19:06:12] Loading plugin: sscanf.dll [19:06:12] [19:06:12] =============================== [19:06:12] sscanf plugin loaded. [19:06:12] Version: 2.8.1 [19:06:12] (c) 2012 Alex "Y_Less" Cole [19:06:12] =============================== [19:06:12] Loaded. [19:06:12] Loading plugin: crashdetect.dll [19:06:12] CrashDetect v4.15.1 is OK. [19:06:12] Loaded. [19:06:12] Loading plugin: streamer.dll [19:06:12] *** Streamer Plugin v2.8.1 by Incognito loaded *** [19:06:12] Loaded. [19:06:12] Loaded 5 plugins. [19:06:12] [19:06:13] Ban list [19:06:13] -------- [19:06:13] Loaded: samp.ban [19:06:13] [19:06:13] [19:06:13] Filterscripts [19:06:13] --------------- [19:06:13] Loaded 0 filterscripts. [19:06:13] [19:06:13] [19:06:13] [19:06:13] ======================================= [19:06:13] | | [19:06:13] | YSI version 4.00.0001 | [19:06:13] | By Alex "Y_Less" Cole | [19:06:13] | | [19:06:13] ======================================= [19:06:13] [19:06:13] ---------- SERVER START ---------- [19:06:13] [debug] OnGameModeInit() [19:06:13] mysql_connect: 1 [19:06:13] ---------------------------------------------------- [19:06:13] Script: ExGaming Roleplay - Based on Saints Roleplay [19:06:13] Status: Loaded, running version Zombie mode [19:06:13] ---------------------------------------------------- [19:06:13] Number of vehicle models: 0 [19:06:13] [LOADING] 14 groups loaded. [19:06:13] [LOADING] 438 vehicles loaded. [19:06:13] [LOADING] 106 houses loaded. [19:06:13] [LOADING] 48 turfs loaded. [19:06:13] [LOADING] 54 businesses loaded. [19:06:13] [LOADING] 105 models loaded. [19:06:13] [LOADING] 0 clans loaded. [19:06:13] [LOADING] 2 sVars loaded. [19:06:13] Players registered: 3 [19:06:25] [connection] 127.0.0.1:52775 requests connection cookie. [19:06:26] [connection] incoming connection: 127.0.0.1:52775 id: 0 [19:06:26] [join] RedGun has joined the server (0:127.0.0.1) [19:06:31] RedGun has been connected to the server (IP: 127.0.0.1). [19:06:36] 439 | 439 //aici e
  13. Am facut cum ai spus tu, insa nu functioneaza, ramane lock, nu se descuie...
  14. Am incercat SetVehicleParamsEx(JobVehicle[playerid],engine,lights,alarm,1,bonnet,boot,objective); sa pun la comanda /work sub PutPlayerInVehicle si la OnVehicleStreamIn am pus ceva de genu: for(new vv; vv < MAX_VEHICLES; vv++) { if(vv == JobVehicle[forplayerid]) { SetVehicleParamsForPlayer(vv,forplayerid,0,0); } } Si cand ma dau jos din vehicul si apas F e incuiata. Am incercat sa incerc si la OnPlayerEnterVehicle si nu merge, la fel.. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(!ispassenger) { if(vehicleid == JobVehicle[playerid]) { SetVehicleParamsForPlayer(vehicleid,playerid,0,0); } } return 1; }
  15. Salut, am incercat sa fac comanda /work insa nu stiu cum pot face ca masina de la job care i-a creat-o cand a folosit /work adica JobVehicle[playerid] sa o poata folosi doar el, atunci cand alt jucator da F/ENTER la masina respectiva sa ii apare ca e incuiata, doar jucatorul proprietar al masini de la job sa aiba acces de F/ENTE in ea, ma puteti ajuta? Comanda este aceasta: CMD:work(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first."); if(PlayerInfo[playerid][pCarLic] == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have driving licence."); if(JobWorking[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You already working. Use /stopwork if you don't want to work anymore."); if(IsPlayerConnected(playerid)) { if(!AdminDuty[playerid]) { if(PlayerInfo[playerid][pJob] == 5) { if(IsPlayerInRangeOfPoint(playerid, 4, Job[5][X], Job[5][Y], Job[5][Z])) { if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { JobVehicle[playerid] = CreateVehicle(448, Pos[0], Pos[1], Pos[2], 90.0000, -1, -1, -1); PutPlayerInVehicleEx(playerid, JobVehicle[playerid], 0); Gas[JobVehicle[playerid]] = 100; JobWorking[playerid] = 1; } else return SCM(playerid, -1, "Nu poti folosi comanda intr-un vehicul."); } } } } return 1; }
  16. Problema rezolvata! Multumesc mult de ajutor.
  17. nu merge , se trimite la fel ca la inceput Andrei was kicked by AdmBot for being AFK for more than 30 minutes. Marius was kicked by AdmBot for being AFK for more than 30 minutes. Inloc de Andrei, Marius were kicked by AdmBot for being AFK for more than 30 minutes.
  18. Apare ceva de genu https://gyazo.com/d354e444d850f799ec31db03773e6c2b
  19. Incearca inloc de SetPlayerSkinEx , SetPlayerSkin
  20. Salut, am urmatorul cod https://pastebin.com/AAGrBwAH si as vrea sa stiu cum as putea face ca jucatorii care primesc kick ( > 1 ) sa nu fie nevoie sa se trimita 2 mesaje pe 2 randuri , ci intr-un rand, actual trimite ceva de genu: Andrei was kicked by AdmBot for being AFK for more than 30 minutes. Marius was kicked by AdmBot for being AFK for more than 30 minutes. Inloc de Andrei, Marius were kicked by AdmBot for being AFK for more than 30 minutes. Cum as putea face acest lucru? Am incercat ceva de genu , am incercat sa si formatezi, nimic, nu iese strcat(gString, ", "); strcat(gString, GetName(i)); Am incercat si asa si nu merge, apare gen , were kicked for being AFK for more than 30 minutes. nu le apar numele.. new players[128], finalString[256] foreach(new i : Player) { if(timeAFK[i] >= 15) { format(players, 128, "%s, ", players, numeJucator); } } format(finalString, 256, "%s was kicked by AdmBot for being AFK for more than 30 minutes.", players);
  21. La executarea /fpk trebuie sa faci actualizarea pentru jucatorul respectiv in baza de date, sa i se seteze group 0, rank 0 ,etc...gen incearca sa copii de la comanda uninvite de la un lider.
  22. Legat de problema de la DS, cred ca trebuie sa modifici tu masinile din baza de date. comanda: incearca sa modifici comanda /movehouse cum vrei tu, eu iti dau un model cum am facut eu CMD:movebiz(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first."); if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 6) return 0; new house,Float:pX,Float:pY,Float:pZ,query[256]; if(sscanf(params, "d", house)) return SendClientMessage(playerid, -1, "Folosire: /movebiz [bizid]"); GetPlayerPos(playerid, pX, pY, pZ); BizzInfo[house][bEntranceX] = pX; BizzInfo[house][bEntranceY] = pY; BizzInfo[house][bEntranceZ] = pZ; new i = house; mysql_format(SQL, query, sizeof(query), "UPDATE `bizz` SET `EntranceX`='%f',`EntranceY`='%f',`EntranceZ`='%f' WHERE `ID`='%d'",BizzInfo[house][bEntranceX],BizzInfo[house][bEntranceY],BizzInfo[house][bEntranceZ],house); mysql_tquery(SQL,query,"",""); SendClientMessage(playerid, -1, "Ai mutat business-ul cu succes!"); OnPropTextdrawUpdate(2, i); //nu stiu sigur daca ai functia, cauta sa vezi daca nu elimina } return 1; }
×
×
  • 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.