Jump to content

-=[Vyorel]=-

Administrator
  • Posts

    2.130
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by -=[Vyorel]=-

  1. Ha ha. Ai vazut si tu asta scris pe undeva si scrii si tu acuma. Eu nu am vazut in viata mea IP-ul la RDS sa incearpa cu 192 ;)
  2. Faci un Timer si pui la timeru ala SetPlayerColor http://www.sa-mp.ro/forum/index.php?topic=6733.0
  3. Ai modem cumva?
  4. Intra in server.cfg si seteaza astea asa: lanmode 0 announce 1 query 1
  5. -=[Vyorel]=-

    Ajutor

    Adauga astea undeva pe la incepulul scriptului, dar punele in ordinea asta enum pInfo { pKey[128], pLevel, pSpawn, pAdmin, pRegularRank, gPupgrade, pConnectSeconds, pReg, pSex, pAge, pOrigin, pCK, pMuted, pFrozen, pExp, pCash, pAccount, pJobTimer, pCrimes, pWanted, pCrimeReason[128], pWantedLevel, pKills, pDeaths, pWhyLeft[24], pArrested, pWantedDeaths, pPhoneBook, pLottoNr, pFishes, pBiggestFish, pJob, pPayCheck, pHeadValue, pJailed, pJailTime, pRobTime, pMats, pDrugs, pLeader, pMember, pFMember, pRank, pChar, pContractTime, pDetSkill, pSexSkill, pBoxSkill, pLawSkill, pMechSkill, pJackSkill, pCarSkill, pNewsSkill, pDrugsSkill, pCookSkill, pFishSkill, Float:pHealth, Float:pSHealth, Float:pArmour, pInt, pInteriorNr, pLocal, pTeam, pModel, pPnumber, pPhousekey, pPcarkey, pPcarkey2, pGangKey, pPbiskey, Float:pPos_x, Float:pPos_y, Float:pPos_z, pPassport, pCarLic, pFlyLic, pBoatLic, pFishLic, pGunLic, pCopLic, pCarTime, pPayDay, pPayDayHad, pWatch, pCrashed, pWins, pLoses, pAlcoholPerk, pDrugPerk, pMiserPerk, pPainPerk, pTraderPerk, pTut, pTutDone, pWarns, pVirWorld, pFuel, pMarried, pMarriedTo[128], pFishTool, pNote1[128], pNote1s, pNote2[128], pNote2s, pNote3[128], pNote3s, pNote4[128], pNote4s, pNote5[128], pNote5s, pInvWeapon, pInvAmmo, pInvWeapon2, pInvAmmo2, pInvWeapon3, pInvAmmo3, pInvWeapon4, pInvAmmo4, pInvWeapon5, pInvAmmo5, pInvWeapon6, pInvAmmo6, pLighter, pCigarettes, pRequestingBackup, pRoadblock, pMask, pMaskuse, pAdminDuty, pTesterDuty, pHelper, pTester, pBlind, pSpeedo, pDTK, pDSTK, pWarned, pHideNumber, pSpeaker, pRhino, pHunter, pHydra, pPredat, pSwat, pTactical, pSpecialF, pDBanned, pDM, pDuty, pGPS, pFS, pBoxiSkill, pKneeSkill, pKungSkill, pGrabSkill, pElbowSkill, pDDFire, pCD, pHydraR, pHunterR, pRhinoR, pPredR, pViewPms, pAppearList, pAndro, pJet, pAmmuTrainTime, pPistSkill, pSilenSkill, pDesertSkill, pShotgSkill, pSawnSkill, pCombSkill, pUziSkill, pSmgSkill, pAkSkill, pM4Skill, pSnipSkill, pRegularCount, pPassportTime, pOfficerTime, pAchievement0, pAchievement1, pAchievement2, pAchievement3, pAchievement4, pAchievement5, pAchievement6, pAchievement7, pAchievement8, pAchievement9, pAchievement10, pAchievement11, pAchievement12, pAchievement13, pAchievement14, pAchievement15, pAchievement16, pAchievement17, pAchievement18, pAchievement19, pAchievement20, pShiftName, pWeapon, pWeapon2, pWeapon3, pWeapon4, pWeapon5, pWeapon6, pWeapon7, pWeapon8, pWeapon9, pWeapon10, pWeapon11, pWeapon12, pAmmo, pAmmo2, pAmmo3, pAmmo4, pAmmo5, pAmmo6, pAmmo7, pAmmo8, pAmmo9, pAmmo10, pAmmo11, pAmmo12, pAtc, pAtcRadio, pPending, pPendingInfo[128], pChatMode, pPunishment1[128], pPunishment2[128], pPunishment3[128], pPunishment4[128], pPunishment5[128], pPunishment6[128], pPunishment7[128], pPunishment8[128], pIP[24], pLastSeen[24], pRegistredDate[24], pNextPunishment, pPunished, pTazerBullets, pChanged, //pSQLID, }; new PlayerInfo[MAX_PLAYERS][pInfo]; In caz ca nu folosesti alealalte pChanged, etc, le stergi.
  6. -=[Vyorel]=-

    Ajutor

    if(strcmp(cmd,"/garaj",true)==0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pLeader] == 7)//inloc de 7 pui nr de la ce factiune vrei { if(IsPlayerInRangeOfPoint(playerid, 11.0, 1589.02050781,-1638.08789062,14.95541191)) MoveObject(Subterranea,1589.02050781,-1638.08789062,8.34928703, 3.0); SendClientMessage(playerid, 0xFFE13FF, "Poarta sa deschis, in 5 secunde se inchide."); SetTimer("cerrar1",5000,false); } else { SendClientMessage(playerid, COLOR_GREY, "Nu esti Cop"); return 1; } } return 1; } Modifici 7 ala de la pLeader cu ce vor muschii tai. Vezi daca merge.
  7. Ma refeream sa o pui aici pe forum.
  8. Ia pune o comanda adaugata de tine sa vedem "buba". ;)
  9. Daca mai postezi aiurea, iei Warn.
  10. http://www.sa-mp.ro/forum/index.php?topic=5356.0
  11. if(strcmp(cmd, "/cabinet", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) { if(PlayerToPoint(5.0, playerid,1307.3610,-29.6294,1001.0339)) { SetPlayerHealth(playerid, 100.0); GivePlayerWeapon(playerid, 24, 500); } else { SendClientMessage(playerid, COLOR_GRAD2, "Sa iei cand ai nevoie"); return 1; } } } return 1; }
  12. Zi-mi coordonatele de la poarta.
  13. Nici eu nu mai stiu cum sa-ti zic ca sa intelegi. Deci, sa presupunem ca nu ai facut harta (cu poarta aia). Intri in MTASA si creezi poarta. Tu in MTA o faci odata cand e deschisa, si inca odata cand e inchisa. Apoi, convertesti mapa pe convertfss.com si iei coordonatele de la poarta cand e inchisa si cand e deschisa. La OnGameModeInit pui coordonatele de la poarta cand e inchisa. La MoveObject pui coordonatele de la poarta cand e deschisa. Ai inteles acum? Daca nu, fa cum a zis stuntman.
  14. Functia OnPlayerPrivmsg nu mai exista in 0.3b Sterge tot ce e in public OnPlayerPrivmsg
  15. Tu nu intelegi. Deci, la MoveObject pui coordonatele la poarta CAND e deschisa. Intri in MTA si faci iar poarta dar cand e deschisa, nu inchisa.
  16. Pai poarta cum o ai bagata daca nu ai coordonatele?
  17. Mai bine pe al lui incognito. Eu pe al lui il folosesc si am peste 16 mii de obiecte si apar toate.
  18. Nu am la fel. Coordonatele alea sunt atunci cand poarta este deschisa. O mai faci odata in MTA. Sper ca acum ai inteles.
  19. MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed); objectid ID-ul obiectului pe care vrei sa-l muti. Float:X Noile coordonate X. Float:Y Noile coordonate Y. Float:Z Noile coordonate Z. Float:Speed Viteza cu care va fii mutat obiectul.
  20. Acelasi lucru i-am spus si eu, sau nu vezi?Nu mai face spam ca iei warn.
  21. Nu. E din cauza ca nu ai includele dudb.inc Intra aici, descarca-l si bagal in folderul Pawno/Include din serverul tau.
  22. Mda. O sa fac un update. http://wiki.sa-mp.com/wiki/MySQL
  23. MySQL Plugin R7 Original post: AICI 17/07/2011: - mysql_format() a fost adaugata) 09/07/2011: - buguri legate de query rezolvate Cum il instalezi: Windows: Copiaza mysql.dll in folderul /plugins si libmysql.dll folderul serverului tau. Apoi adauga in server.cfg 'plugins mysql' Linux: Copiaza mysql.so in folderul /plugins si adauga in server.cfg 'plugins mysql.so' PAWN Scripting: (a_mysql.inc) Functii Native: (Toti parametrii din parantezele patrate sunt optionalel) mysql_affected_rows( [connectionHandle = 1] ) mysql_close( [connectionHandle = 1] ) Asigura-te ca "chemi" acesta in OnGameModeExit()/OnFilterscriptExit() [*]mysql_connect( const host[], const user[], const database[], const password[] ) Returns a connection handle you can use for multiple connections //acest exemplu demonstreaza cum sa folosesti mai multe conexiuni new SQLPtr[2]; //global var ... Function() { SQLPtr[0] = mysql_connect(...); SQLPtr[1] = mysql_connect(...); mysql_query("SELECT a FROM table WHERE foo = 'bar'",(-1),(-1),SQLPtr[0]); //select query in the first DB mysql_query("UPDATE b SET bar = 'foo'",(-1),(-1),SQLPtr[1]); //update query in the second DB mysql_close(SQLPtr[1]); //close the 2nd DB connection, the other connection still exists mysql_debug( activat = 1 ) Activeaza-l si creaza un fisier log cu numele mysql.log mysql_errno( [connectionHandle = 1] ) mysql_fetch_int( [connectionHandle = 1] ) mysql_fetch_field_row( string[], const fieldname[] [,connectionHandle = 1] ) mysql_fetch_float( &Float:result [,connectionHandle = 1] ) mysql_fetch_row_format( string[], const delimiter[] = "|" [,connectionHandle = 1] ) mysql_field_count( [connectionHandle = 1] ) mysql_format( [connectionHandle = 1] ) [pawn]Supoerta: (%2.f/%10.s nu sunt suportate) - %e (scapa de date direct,fara a fi nevoie de mysql_escape_string() inainte,dar nu da si query!) - %s (string) - %d / %i (integer) - %f (float) new szDestination[100]; mysql_format(connectionHandle, szDestination, "SELECT * FROM `%s` WHERE `bar` = '%e' AND `foobar` = '%f' LIMIT %d", "foobar", "escape'me\"please", 1.2345, 1337); //variabila 'szDestination' contine stringul fara caractere care ar purea face SQL INJECTION mysql_query(szDestination);[/pawn] mysql_free_result( [connectionHandle = 1] ) mysql_get_charset( destination[] [,connectionHandle = 1] ) mysql_insert_id( [connectionHandle = 1] ) mysql_num_rows( [connectionHandle = 1] ) mysql_num_fields( [connectionHandle = 1] ) mysql_ping( [connectionHandle = 1] ) Adauga return 1; daca conexiunea este activa, daca nu adauga return -1; [*]mysql_query( query[] [,resultid = (-1), extraid = (-1), connectionHandle = 1] ) Setting result id to something else than (-1), triggers the OnQueryFinish callback [*]mysql_query_callback( index, query[], callback[] [, extraid = (-1), connectionHandle = 1] ) Allows you to create custom callbacks for better structured coding (See sample_script.pwn below) [*]mysql_real_escape_string( const source[], destination[] [,connectionHandle = 1] ) [*]mysql_reconnect( [connectionHandle = 1] ) [*]mysql_reload( [connectionHandle = 1] ) [*]mysql_retrieve_row( [connectionHandle = 1] ) Returns true (1) incase there are still rows to retrieve, else false (0) [*]mysql_set_charset( charset[] [,connectionHandle = 1] ) [*]mysql_stat( const destination[] [,connectionHandle = 1] ) [*]mysql_store_result( [connectionHandle = 1] ) [*]mysql_warning_count( [connectionHandle = 1] ) Pawn Callback: OnQueryFinish( query[], resultid, extraid, connectionHandle ) - Sample usage (updated) This is just called if you used the 'resultid' parameter in the query function OnQueryError( errorid, error[], resultid, extraid, callback[], query[], connectionHandle ) Compiling Notes: Windows: Deschide fisierul de proiect cu Microsoft Visual C++ si click pe bunonul build. (MySQL Visual Studio/C++ este necesar) Linux: Instaleaza gcc, gpp & mysql-client si scrie "make" in fisierele sursa. Download: Windows: (requires .NET Framework) R6-2: Server plugin (VS9) R6: Server plugin (VS9) R5: Server plugin (VS9) libmysql.dll Linux: (x86 (32-bit) version is cross compatible) R6-2: Ubuntu (threadsafe), x86 (compiled on Ubuntu 11.04) R6: CentOS, Debian 5, x86 (compiled on CentOS), x86 (compiled on Debian5) R5: CentOS, Debian 5, x86 libmysqlclient.so.15 - Getting this error.. 'libmysqlclient.so.15: cannot open shared [..]' ? - Read this [*]Scripting: R6-2: a_mysql.inc (includes mysql_format()) R5, R6: a_mysql.inc, Sample PAWN script Archive: PHP class, Modified sample script (by nemesis) (only R5/R6 compatible) [*]Source: (Cross-Compatible) R7: Source code (+ new include file) R6-2: Source code (rar), Source code (tar.bz2) R6: Source code R5: Source code Daca nu intelegi ceva, posteaza aici. Stiu ca nu am tradus tot dar nu am avut timp. O sa-l traduc complet. Atentie: Fiti foarte atenti la SQL Injection,sunt multi rau-voitori. https://docs.google.com/Doc?docid=0AZNlBave77hiZGNjanptbV84Z25yaHJmMjk&pli=1#Allowed_Intermediary_Character_30801873723976314
  24. La OnGameModeInit le-ai adaugat? Adica asa: CreateDynamicMapIcon(X, Y, Z, 5, 0); // asta e facut cu streamerul lui Incognito
×
×
  • 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.