Jump to content

TheGodfather

Membru
  • Posts

    489
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by TheGodfather

  1. Multumesc, voi incerca cand ajung acasa
  2. Am incercat si tot asa imi spune. Dupa ce dau /park, ma scoate din masina si cand dau /v imi spune ca e "occupied".
  3. Salut, cand dau /park, parcheaza masina corect dar daca ma uit in /v imi spune ca este "occupied" chiar daca eu nu mai sunt in ea. Ma scoate cand dau /park. YCMD:park(playerid, params[], help) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); new car = GetPlayerVehicleID(playerid); if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You are not in your vehicle."); if(Iter_Count(MyVehicle[playerid]) == 0) return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You do not have a personal vehicle!"); if(PersonalCar(playerid) == -1) return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You are not in one of your vehicles!"); if(GetPlayerState(playerid) != 2) return SCM(playerid, COLOR_GREEN, "* You need to drive the car in order to use this command!"); new idd = PersonalCar(playerid); new Float: vhp; GetVehicleHealth(car, vhp); if(vhp < 800) return SCM(playerid, COLOR_GREY, "You can not park the car because it has less than 800 'health'!"); if(PlayerToPoint(150, playerid, 564.1226, -1270.0704, 17.2477)) return SCM(playerid, COLOR_ERROR, "INFO: {FFFFFF}You can not park the car near the spawn."); new Float:x, Float:y, Float:z, Float:a; saveTuning(playerid, CarInfo[idd][Spawned]); GetVehiclePos(car, x, y, z); GetVehicleZAngle(car, a); CarInfo[idd][cLocationx] = x; CarInfo[idd][cLocationy] = y; CarInfo[idd][cLocationz] = z; CarInfo[idd][cTime] = gettime()+600; CarInfo[idd][cAngle] = a; CarInfo[idd][cVirtual] = GetPlayerVirtualWorld(playerid); DestroyVehicle(car); if(strlen(CarInfo[idd][cText]) >= 3) { DestroyDynamicObject(nameobject[CarInfo[idd][Spawned]]); } CarInfo[idd][Spawned] = CreateVehicleEx(CarInfo[idd][cModel],CarInfo[idd][cLocationx],CarInfo[idd][cLocationy],CarInfo[idd][cLocationz],CarInfo[idd][cAngle],CarInfo[idd][cColorOne],CarInfo[idd][cColorTwo], -1, 0); SetVehicleVirtualWorld(CarInfo[idd][Spawned], CarInfo[idd][cVirtual]); attach_vip_text(idd); SetVehicleHealth(CarInfo[idd][Spawned], CarInfo[idd][cVip] ? 2000 : 1000); SetTunning(idd); SetVehicleNumberPlate(CarInfo[idd][Spawned], CarInfo[idd][cLicense]); saveCar(idd); new Float: Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); CarInfo[idd][cLastPos][0] = Pos[0]; CarInfo[idd][cLastPos][1] = Pos[1]; CarInfo[idd][cLastPos][2] = Pos[2]; return true; } function IsVehicleOccupied(vehicleid) return VehicleOccupied[vehicleid] != 0 ? (true) : (false); stock ShowPlayerVehicle(playerid, bool: type) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); new szTitle[2000], szDialog[2000], x = 0; if(Iter_Count(MyVehicle[playerid]) == 0) return SCM(playerid, COLOR_LGREEN, "Error: You do not have a personal vehicle!"); format(szTitle, sizeof(szTitle), "Your Vehicles {E3DE31}%d/%d", Iter_Count(MyVehicle[playerid]), GetSlots(playerid)); strcat(szDialog, "Vehicul\tStatus\tDespawn Time\tOthers details\n"); foreach(MyVehicle[playerid], car) { format(szDialog, sizeof(szDialog), "%s%s\t%s\t%s\t%s\n", szDialog, aVehicleNames[CarInfo[car][cModel]-400], CarInfo[car][Spawned] != 0 ? IsVehicleOccupied(CarInfo[car][Spawned]) ? ("{FFFF00}[occupied]") : ("{26B309}[spawned]") : ("{FF0000}[despawned]"), CheckDespawnCar(car), TotalUp(car)); PlayerInfo[playerid][pCarKey][x] = car; x++; } ShowPlayerDialog(playerid, type ? DIALOG_STICKET : DIALOG_GARAGE, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog, "Ok", "Exit"); return true; }
  4. Salut, am un server de samp si am nevoie de o persoana care sa ma ajute cu popularea lui. Mai multe detalii discutam in privat, cine e interesat ma poate contacta pe discord: The Godfather#0066
  5. Am incercat pe localhost si si pe server dar nu face nimic din pacate.
  6. Astea sunt toate locurile in care apar cele 2 functii mentionate in ultimul mesaj scris de tine. public OnPlayerRequestClass(playerid, classid) { if(IsPlayerLogged[playerid] == 1) SpawnPlayer(playerid); return true; } function ShowExam(playerid, type) { if(StepExam[playerid] == 0) { for(new i = 0; i < 13; i++) PlayerTextDrawShow(playerid, ExamTD[i]); SelectTextDraw(playerid, 0x52EF4AFF); TogglePlayerControllable(playerid, false); InterpolateCameraPos(playerid, 2637.850830, -985.842224, 111.864707, 2637.850830, -985.842224, 111.864707, 1000); InterpolateCameraLookAt(playerid, 2635.984130, -985.135314, 107.280380, 2633.261962, -984.218200, 110.722541, 1000); SetPlayerInterior(playerid, 0); } ExamTime[playerid] = 30; PlayerTextDrawSetString(playerid, ExamTD[4], "~b~00:30"); switch(type) { case 0: { switch(StepExam[playerid]) { case 0: { PlayerTextDrawSetString(playerid, ExamTD[6], "On who you can make DM? (1/5)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. No one."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. Cops."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. Everyone."); } case 1: { PlayerTextDrawSetString(playerid, ExamTD[6], "What happens if you do C-Bug? (2/5)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. Nothing."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. I will be banned."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. I receive money."); } case 2: { PlayerTextDrawSetString(playerid, ExamTD[6], "With what this license helps me? (3/5)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. Access to weapons."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. Nothing."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. I will be kicked."); } case 3: { PlayerTextDrawSetString(playerid, ExamTD[6], "I can sell this license? (4/5)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. Yes."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. I can trade it."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. No."); } case 4: { PlayerTextDrawSetString(playerid, ExamTD[6], "I can use weapons without this license? (5/5)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. No."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. Yes."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. I will be kicked."); } case 5: { ExamHP[playerid] = 10; SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, true); for(new i = 0; i < 13; i++) PlayerTextDrawHide(playerid, ExamTD[i]); SetPlayerPosEx(false, playerid, 291.5567,-135.8325,1004.0625); CancelSelectTextDraw(playerid); SetPlayerInterior(playerid, 7); GivePlayerWeapon(playerid, 23, 10); SCM(playerid, COLOR_LIGHTBLUE, "License: {FFFFFF}Destroy this box."); ExamTime[playerid] = 0; } } } case 1: { switch(StepExam[playerid]) { case 0: { PlayerTextDrawSetString(playerid, ExamTD[6], "What i can do with a boat license? (1/4)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. To swim."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. To fish."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. To drive a boat."); } case 1: { PlayerTextDrawSetString(playerid, ExamTD[6], "where i am allowed to go? (2/4)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. Through LV."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. Through water."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. Through air."); } case 2: { PlayerTextDrawSetString(playerid, ExamTD[6], "How i start a boat? (3/4)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. Pressing key '2'."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. Using /engine."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. It starts automatically."); } case 3: { PlayerTextDrawSetString(playerid, ExamTD[6], "Are you allowed to take the boat on the dry land? (4/4)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. No."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. Maybe."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. Yes."); } case 4: { SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, true); for(new i = 0; i < 13; i++) PlayerTextDrawHide(playerid, ExamTD[i]); SetPlayerInterior(playerid, false); SetPlayerVirtualWorld(playerid, false); ExamCar[playerid] = CreateVehicleEx(446, 2232.7983,411.4962,-0.5455,316.5272, 1, 1, -1, 0); Gas[ExamCar[playerid]] = 100; ExamTime[playerid] = 0; CancelSelectTextDraw(playerid); CP[playerid] = 120; SetPlayerRaceCheckpointEx(playerid, 0, DMVBOAT[CP[playerid]-120][0], DMVBOAT[CP[playerid]-120][1], DMVBOAT[CP[playerid]-120][2], DMVBOAT[CP[playerid]-120][0], DMVBOAT[CP[playerid]-120][1], DMVBOAT[CP[playerid]-120][2], 10.0); new engine,lights,alarm,bonnet,boot,objective; SetVehicleParamsEx(ExamCar[playerid],engine,lights,alarm,1,bonnet,boot,objective); PutPlayerInVehicleEx(playerid, ExamCar[playerid], 0); } } } } return 1; } function Camera(playerid) { InterpolateCameraPos(playerid, 2206.400146, 2485.206787, 104.116271, 2065.331054, 2227.627197, 63.345684, 40000); InterpolateCameraLookAt(playerid, 2203.034667, 2482.306396, 101.822631, 2067.583007, 2231.956542, 62.256824, 40100); SetPlayerPosEx(false, playerid, 2269.6230, -74.9329, 26.7724); SetPlayerVirtualWorld(playerid, 9999); return true; }
  7. Si e ceva ciudat, nu patesc asta de fiecare data. Uneori ma da acolo, uneori nu. Fara sa schimb nimic la gamemode.
  8. Gamemode-ul este cel editat de hpq123, b-hood. Nu am schimbat nimic la onplayerspawn, mergea bine dar dupa un timp ma da acolo aiurea
  9. Salut, cand intru pe server si ma pune sa ma loghez, ma da la coordonatele 0, 0, 0 de la harta si nu stiu de ce. Aveti vreo idee?
  10. Am rezolvat, puteti inchide topicul.
  11. Salut, vreau sa fac o comanda /lastchat cu care sa pot sa vad ultimele x mesaje ale unui jucator. Am incercat asa dar nu imi afiseaza nimic. YCMD:lastchat(playerid, params[], help) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); if(PlayerInfo[playerid][pAdmin] < return SCM(playerid,COLOR_WHITE,AdminOnly); new giveplayerid[25],id,cont,name[30]; if(sscanf(params, "s[25]d", giveplayerid, id)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/lastchat <name> <number of messages>"); cont = MySQLCheckAccount(giveplayerid); if(cont == 0) return SCM(playerid,COLOR_ERROR,"Error:{FFFFFF} This account was not found in the database!"); GetPlayerName(playerid, name, sizeof name); // new szQuery[256], string[180], MemberString[1024], szResult[180], text[180],TitleString[180]; format(szQuery, sizeof(szQuery), "SELECT * FROM `logs` WHERE `Name`='%s' ORDER BY `ID` DESC LIMIT %d", GetName(playerid), id); new Cache: result = mysql_query(SQL, szQuery); for(new i, j = cache_num_rows(); i != j; ++i) { cache_get_field_content(i, "player", szResult); format(name, 256, szResult); cache_get_field_content(i, "Text", szResult); format(text, 256, szResult); format(string, sizeof(string), "%s", text);strcat(MemberString, string, sizeof(MemberString)); } cache_delete(result); format(TitleString, sizeof(TitleString), "Last %d messages from player %s.", id, name); ShowPlayerDialog(playerid, DIALOG_LASTCHAT, DIALOG_STYLE_TABLIST_HEADERS, TitleString, MemberString, "Ok", "Exit"); // return 1; } case DIALOG_LASTCHAT: { if(!response) return true; }
  12. Salut, am vrut sa adaug un nou PNS, cand intru in el ma da si scoate la alt PNS. Am adaugat PNS in baza de date, cu coordonate cu tot. In GM am asa: new Float: PutVehiclePNS[5][4] = { {1975.3617,2162.3789,10.7974,268.9753}, {1024.8359,-1025.1244,31.8286,1.4482}, {720.1768, -456.4775, 15.4988,1.0200}, {720.1006,-458.8903,16.0630,0.0031} //2newpns ,{487.4117, -1741.3563, 10.8499, 173.0401} //2newpns }; new Float: ExitVehiclePNS[5][4] = { {1963.0897,2162.2114,10.5474,89.7477}, {1024.9517,-1034.4995,31.4208,177.5887}, {720.0970,-466.9240,16.0688,181.9951}, {720.1700,-467.4203,16.0688,178.9350} //2newpns ,{488.8409, -1730.2566, 10.9630, 353.4602} //2newpns }; Ce e intre // sunt locatiile de la PNS pe care vreau sa il adaug. function PutVehicleInPNS(playerid, idd) { LastPns[playerid] = idd; SetVehiclePos(GetPlayerVehicleID(playerid), PutVehiclePNS[idd][0], PutVehiclePNS[idd][1], PutVehiclePNS[idd][2]); SetVehicleZAngle(GetPlayerVehicleID(playerid), PutVehiclePNS[idd][3]); GetVehicleHealth(GetPlayerVehicleID(playerid), VehicleHealth[playerid]); TogglePlayerControllable(playerid, false); PnsTimer[playerid] = gettime()+5; return true; } if(PnsTimer[playerid] != -1) return true; for(new i = 1; i <= GpsBizzType[14]; i++) { idd = BizzTypeID[14][i]; if(!PlayerToPoint(10, playerid, BizzInfo[idd][bEntranceX], BizzInfo[idd][bEntranceY], BizzInfo[idd][bEntranceZ])) continue; PutVehicleInPNS(playerid, i-1); cc = true; break; } Am incercat aici la PutVehicleInPNS in loc de i-1 sa pun i dar dupa nu mai merge in celelalte bizuri de tip PNS. Bizurile de tip PNS au numarul 14 in baza de date ca biz.
  13. Dar de ce cand cumpara masina apare bugul iar dupa ce da relog nu mai e nimic? Fara sa schimb ceva la cod
  14. Am gm b-hood HPQ123. Tin sa mentionez ca acest bug apare doar dupa ce un jucator cumpara o masina din DS. Daca da relog problema dispare.
  15. Voi incerca azi, putin mai tarziu pentru ca sunt la cursuri acum. Multumesc frumos pentru ajutor, revin cu reply daca voi mai avea nevoie de ajutor
  16. Este scrisa pe ultimul rand din mesajul meu de mai sus
×
×
  • 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.