Jump to content

Akan

Membru
  • Posts

    75
  • Joined

  • Days Won

    6

Everything posted by Akan

  1. ShowRenters(playerid) { new sQuery[256], string[180], MemberString[1024], szResult[180]; new name[180], TitleString[180], tmembers, onmembers; format(sQuery, sizeof(sQuery), "SELECT * FROM `users` WHERE `Rented` = %d LIMIT 50", PlayerInfo[playerid][pHouse]); new Cache: result = mysql_query(SQL, sQuery); for(new i, j = cache_get_row_count(); i != j; ++i) { cache_get_field_content(i, "name", szResult); format(name, 256, szResult); new userID = GetPlayerID(name); if(userID != INVALID_PLAYER_ID) { onmembers++; format(string, sizeof(string), "%d. %s (%d) (Online)\n", tmembers+1, name, userID); strcat(MemberString, string, sizeof(MemberString)); } else { format(string, sizeof(string), "%d. %s (Offline)\n", tmembers+1, name); strcat(MemberString, string, sizeof(MemberString)); } tmembers++; } cache_delete(result); format(TitleString, sizeof(TitleString), "Chiriasi (%d/%d)", onmembers, tmembers); ShowPlayerDialog(playerid, DIALOG_RENTERS, DIALOG_STYLE_LIST, TitleString, MemberString, "OK", "Close"); return 1; } Eu asa am functia. Daca nu ai `Rented` in `users`, poti inlocui cum ai tu, adica in loc de `Rented` inlocuiesti cu `House` stock GetPlayerID(playerName[]) { foreach(new i: Player) { if(IsPlayerLogged[i] == 1) { if(strcmp(PlayerInfo[i][pUsername], playerName, true) == 0) return i; } } return INVALID_PLAYER_ID; } Ti-am lasat aici si functia GetPlayerID in caz ca nu o ai.
  2. Cauta aceasta linie in comanda /fpk: PlayerInfo[id][pChar] = 0; Zero este id-ul skin-ului CJ, pui in loc de 0 ce skin vrei sa-i seteze cand ia fpk, sau daca vrei sa ramana cu skin-ul pe care il avea cand a primit /fpk, pur si simplu stergi toata linia.
  3. Ai 14 job-uri, nu 13, deoarece job-ul 7 (Mecanic probabil) este "dezactivat" dar el inca exista! MAX_JOBS trebuie sa fie 14.
  4. Cu multa placere! Vezi sa inlocuiesti la fel si la DIALOG_CHANGEPIN+1 ca sa functioneze si cand iti schimbi PIN-ul. Bafta!
  5. Exista si skill mai mare decat 3? Sau mai mic decat 1, adica 0? Ca din codul tau vad ca se creeaza tirul doar in caz ca ai pTruckSkill egal cu 1, 2 sau 3. Daca ai alt skill nu iti creeaza nici un vehicul.
  6. format(query, sizeof(query), "UPDATE users SET Pin = %i WHERE `ID` = %i", pin, playerVariables[playerid][pSQLID]); Pune direct asa in locul acelui query al tau de la dialog_setpin. Din mysql_log pe care l-ai trimis se vede ca nu ai inlocuit cum ti-am zis... `Pin' - asta e gresit, ai ` inainte de Pin si ' dupa Pin ... 2 semne de punctuatie diferite... sterge-le pe amandoua, pune cum ti-am scris eu mai sus codul ca nu sunt necesare semnele de punctuatie in cazul de fata!
  7. Nu ar trebui in loc de new rows; for(new x; x <= cache_num_rows(rows); x++) sa fie for(new x; x < sizeof(HouseInfo); x++) ?
  8. E scris gresit in query-ul de la DIALOG_SETPIN. Inlocuieste: `Pin'='%s' cu `Pin` = %i Si la DIALOG_CHANGEPIN+1 inlocuieste la fel!
  9. Da-mi add Shax#7590 pe discord ca te ajut eu
  10. Da-mi add Shax#7590 pe discord ca te ajut eu
  11. Akan

    Ajutor gm

    Da-mi add Shax#7590 pe discord ca te ajut eu
  12. Da-mi add, discord: Shax#7590 daca mai ai nevoie.
  13. Cu multa placere. #define FILTERSCRIPT #include <a_samp> #if defined FILTERSCRIPT #define BackTime 12000 // Timpul in care liftul revine la pozitia initiala new pdlift[2]; forward PdLift1(); forward PdLift2(); forward IsACop(playerid); forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z); public OnFilterScriptInit() { ////////////////////////////////////////////////////////////////////////// //////////aici se pune exteriorul //////// ////////////////////////////////////////////////////////////////////////// pdlift[0] = CreateObject(19359, 2089.24634, 2361.20728, 10.20070, 0.00000, -90.00000, 0.00000); ///// liftul 1 pdlift[1] = CreateObject(19359, 2197.13550, 2396.73804, 10.45930, 0.00000, -90.00000, -90.00000); ///// liftul 2 print("\n--------------------------------------"); print(" Flashhiee"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/lift", cmdtext, true, 10) == 0) { if(PlayerToPoint(5.0,playerid,2089.24634, 2361.20728, 10.20070) || PlayerToPoint(5.0,playerid,2089.24634, 2361.20728, 22.48570)) { /// sus/jos (lift 1) if(!IsObjectMoving(pdlift[0])) { MoveObject(pdlift[0],2089.24634, 2361.20728, 22.48570,1.5); //// jos (lift 1) SetTimer("PdLift1",BackTime,false); } else { SendClientMessage(playerid,-1,"Lift is already used."); } } else if(PlayerToPoint(5.0,playerid,2197.13550, 2396.73804, 10.45930) || PlayerToPoint(5.0,playerid,2197.13550, 2396.73804, 22.55330)) { /// sus/jos (lift 2) if(!IsObjectMoving(pdlift[1])) { MoveObject(pdlift[1],2197.13550, 2396.73804, 22.55330,1.5); //// jos (lift 2) SetTimer("PdLift2",BackTime,false); } else { SendClientMessage(playerid,-1,"Lift is already used."); } } else { SendClientMessage(playerid,-1,"You must be close to lift."); } return 1; } return 0; } public PdLift1() return MoveObject(pdlift[0],2089.24634, 2361.20728, 10.20070,1.5); //// sus (lift 1) public PdLift2() return MoveObject(pdlift[1],2197.13550, 2396.73804, 10.45930,1.5); //// sus (lift 2) public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z) { if(IsPlayerConnected(playerid)) { new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } } return 0; } #endif #define BackTime 12000 // Timpul in care liftul revine la pozitia initiala Poftim! Bafta!
  14. Zi-mi ce coordonate vrei pentru al doilea lift (sus si jos) si ti-l fac eu.
  15. Da-mi add: Shax#7590 si te ajut eu
  16. Da-mi add pe discord daca mai cauti scripter: Shax#7590
  17. Da-mi add pe discord sa te ajut: Shax#7590
  18. Akan

    Eroare 029

    Inlocuieste linia cu: `AddStaticPickup(1239, 23, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]);` SbEntrance trebuie sa fie cu 's' mic.
  19. Adauga-ma pe discord sa te ajut: Shax#7590
  20. Inlocuieste `PlayerInfo[playerid][Exp] = 0;` cu `PlayerInfo[playerid][Exp] -= 75*PlayerInfo[playerid][LVL];`
×
×
  • 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.