Jump to content

vasy

Membru
  • Posts

    196
  • Joined

  • Last visited

    Never

Everything posted by vasy

  1. vasy

    o line proasta

    funky multumesc de ajutor dar regulamentul interzice sa faci ce ai facut tu 14.Daca cineva i-a explicat problema, nu aveti voie sa dati reply cu acelasi raspuns dar cu alt pretext. Iar next ai +1rep de la mine Dati tc
  2. vasy

    o line proasta

    nu ma poate ajuta nimeni?
  3. uite missinonpizza ti-am facuto eu [pawn]// This function gets called whenever a courier player enters "/work" Pizza_StartJob(playerid) { // Setup local variables new HouseCounter, HousesInRange[200], DialogList[200]; // First clear the house-list for (new i; i < 11; i++) APlayerData[playerid][PizzaHouses] = 0; // Count how many owned houses are in range of the player for (new HouseID = 1; HouseID < MAX_HOUSES; HouseID++) { // Check if the house is owned if (AHouseData[HouseID][Owned] == true) { // Check if the house is in range of the player if (IsPlayerInRangeOfPoint(playerid, PizzaJobRange, AHouseData[HouseID][HouseX], AHouseData[HouseID][HouseY], AHouseData[HouseID][HouseZ])) { // Check if there aren't 200 in-range houses have been found yet if (HouseCounter < 200) { HousesInRange[HouseCounter] = HouseID; // Store the HouseID in the list of in-range houses HouseCounter++; // Increase the number of owned houses in range of the player (range = 1000 meters) } else { break; // Stop searching for more houses (200 is the maximum) } } } } // Abort the mission if there are less than 2 houses in range and inform the player if (HouseCounter < 2) { SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Not enough owned houses in range to deliver packages, try some other spot"); return 0; } // Try to add the 3 lines to the dialog-list if (HouseCounter >= 2) { format(DialogList, sizeof(DialogList), "Deliver 2 packages\n"); // Add the line to the dialog APlayerData[playerid][PizzaMaxStep] = 2; // Set the number of houses for the job to 2 } if (HouseCounter >= 5) { format(DialogList, sizeof(DialogList), "%sDeliver 5 packages\n", DialogList); // Add the line to the dialog APlayerData[playerid][PizzaMaxStep] = 5; // Set the number of houses for the job to 5 } if (HouseCounter >= 10) { format(DialogList, sizeof(DialogList), "%sDeliver 10 packages\n", DialogList); // Add the line to the dialog APlayerData[playerid][PizzaMaxStep] = 10; // Set the number of houses for the job to 10 } // Choose a random house for the first house to visit APlayerData[playerid][PizzaHouses][1] = HousesInRange[random(HouseCounter)]; // Now choose as many houses randomly as allowed, starting from the second for (new i = 2; i <= APlayerData[playerid][PizzaMaxStep]; i++) { // Copy a random HouseID from the prepared list on in-range houses to the job-list APlayerData[playerid][PizzaHouses] = HousesInRange[random(HouseCounter)]; // If the HouseID is the same as the previous HouseID (the player would visit the same house twice in a row) while (APlayerData[playerid][PizzaHouses][i - 1] == APlayerData[playerid][PizzaHouses]) APlayerData[playerid][PizzaHouses] = HousesInRange[random(HouseCounter)]; // Get a new random HouseID as long as the HouseID is the same as the previous one } // Let the player choose how many packages he wants to deliver ShowPlayerDialog(playerid, DialogPizzaSelectQuant, DIALOG_STYLE_LIST, "Choose how many packages you want to deliver", DialogList, TXT_DialogButtonSelect, TXT_DialogButtonCancel); return 1; } // This function is called when the player has chosen how many packages he wants to deliver Pizza_BeginJob(playerid) { // Setup local variables new RouteText[128], Step, HouseID, Float:x, Float:y, Float:z; // Job has started APlayerData[playerid][JobStarted] = true; // Store the vehicleID (required to be able to check if the player left his vehicle) APlayerData[playerid][VehicleID] = GetPlayerVehicleID(playerid); // Set jobstep to 1 (going to the first house) Step = 1; APlayerData[playerid][JobStep] = Step; // Get the HouseID of the house where the mission starts (the first house in the list of in-range owned house) HouseID = APlayerData[playerid][PizzaHouses][step]; // Set the TextDraw so the player can see it format(RouteText, 255, "~w~Deliver package ~b~%i/%i~w~ to: ~r~%s", Step, APlayerData[playerid][PizzaMaxStep], AHouseData[HouseID][HouseName]); TextDrawSetString(APlayerData[playerid][MissionText], RouteText); // Grab the x, y, z positions for the first location x = AHouseData[HouseID][HouseX]; y = AHouseData[HouseID][HouseY]; z = AHouseData[HouseID][HouseZ]; // Create a checkpoint where the player should deliver his package SetPlayerCheckpoint(playerid, x, y, z, 3); // Set the job-fail-time for the global vehicle-timer APlayerData[playerid][VehicleTimerTime] = Job_TimeToFailMission; // Send the player a message to inform him that the mission has started SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}Deliver packages to player's houses"); return 1; } // This function is called when a Pizza enters a checkpoint Pizza_OnPlayerEnterCheckpoint(playerid) { // Setup local variables new RouteText[128], Step, HouseID, Float:x, Float:y, Float:z, Name[24], Msg[128], Payment; // Check if the player is outside his vehicle while entering a checkpoint if (GetPlayerVehicleSeat(playerid) == -1) { // Check if all the packages haven't been delivered if (APlayerData[playerid][PizzaMaxStep] != APlayerData[playerid][JobStep]) { // First disable the current checkpoint DisablePlayerCheckpoint(playerid); // Let the player know he delivered a package GameTextForPlayer(playerid, TXT_PackageDeliveredGameText, 5000, 4); SendClientMessage(playerid, 0xFFFFFFFF, TXT_PackageDeliveredMessage); // Set next JobStep (next house) APlayerData[playerid][JobStep]++; Step = APlayerData[playerid][JobStep]; // Get the HouseID of the house where the mission starts (the first house in the list of in-range owned house) HouseID = APlayerData[playerid][PizzaHouses][step]; // Set the TextDraw so the player can see it format(RouteText, 255, "~w~Deliver package ~b~%i/%i~w~ to: ~r~%s", Step, APlayerData[playerid][PizzaMaxStep], AHouseData[HouseID][HouseName]); TextDrawSetString(APlayerData[playerid][MissionText], RouteText); // Grab the x, y, z positions for the first location x = AHouseData[HouseID][HouseX]; y = AHouseData[HouseID][HouseY]; z = AHouseData[HouseID][HouseZ]; // Create a checkpoint where the player should deliver his package SetPlayerCheckpoint(playerid, x, y, z, 3); } else // All packages have been delivered, the player has to get paid now { // Get the player name GetPlayerName(playerid, Name, sizeof(Name)); // Send a message to all players to inform them that this player completed a Pizz-job format(Msg, 128, TXT_PlayerCompletedPizzaJob, Name, APlayerData[playerid][PizzaMaxStep]); SendClientMessageToAll(0xFFFFFFFF, Msg); // Set a payment based on the number of packages Payment = APlayerData[playerid][PizzaMaxStep] * PaymentPerPackage; // Pay the player money and give scorepoints, both based on the number of packages delivered RewardPlayer(playerid, Payment, APlayerData[playerid][PizzaMaxStep]); // Send a message to let the player know he finished his mission and got paid format(Msg, 128, TXT_RewardJob, Payment); SendClientMessage(playerid, 0xFFFFFFFF, Msg); // Increase the stats for completing a pizza job APlayerData[playerid][statsPizzaJobs]++; // End the current trucker job (clear mission-data) Pizza_EndJob(playerid); // Also save the data (in case the server crashes, progress would be lost) PlayerFile_Save(playerid); } } else SendClientMessage(playerid, 0xFFFFFFFF, TXT_NeedOnFootToProceed); return 1; } // This function is used to stop any Pizza-mission that has been started Pizza_EndJob(playerid) { if (APlayerData[playerid][JobStarted] == true) { // Clear all data about the job from the player, so he can start a new one APlayerData[playerid][JobStarted] = false; APlayerData[playerid][JobStep] = 0; APlayerData[playerid][VehicleTimerTime] = 0; APlayerData[playerid][VehicleID] = 0; APlayerData[playerid][PizzaMaxStep] = 0; // Clear the list of houses-in-range for (new i; i < 11; i++) APlayerData[playerid][PizzaHouses] = 0; // Delete the checkpoint DisablePlayerCheckpoint(playerid); // Reset the missiontext TextDrawSetString(APlayerData[playerid][MissionText], Pizza_NoJobText); } return 1; } [/pawn] iar dialogs sterge ce e legat de pizza ca functioneaza pe courier eu asa am :-??
  4. vasy

    o line proasta

    am facut asa [pawn] new string[256]; new nume[MAX_PLAYER_NAME]; format(string, sizeof(string), "Adminul %s (cu id %d) a reparat toate masinile", nume, playerid); SendClientMessageToAll(0x00FF00FF, string);[/pawn] dar imi arata numai id nu si numele
  5. cum rezolv aceste erori Chiar nu imi pot da seama [pawn]C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(844) : warning 202: number of arguments does not match definition C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(844) : error 001: expected token: ",", but found "-string-" C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(844) : warning 215: expression has no effect C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(844) : error 001: expected token: ";", but found ")" C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(844) : error 029: invalid expression, assumed zero C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(844) : fatal error 107: too many error messages on one line[/pawn] erorile vin de la comanda asta [pawn]// Repairs all vehicles COMMAND:repairall(playerid, params[]) { new nume[MAX_PLAYER_NAME]; // Send the command to all admins so they can see it SendAdminText(playerid, "/repairall", params); // Check if the player has logged in if (APlayerData[playerid][LoggedIn] == true) { // Check if the player's admin-level is at least 3 if (APlayerData[playerid][PlayerLevel] >= 4) { // Loop through all vehicles for (new i; i < 2000; i++) RepairVehicle(i); // Fully repair the vehicle (damage value and bodywork) // Send all players a message to inform them that all vehicles have been repaired SendClientMessageToAll(0x00FF00FF, nume, playerid "Adminul %s[%i] a reparat toate masinile"); } else return 0; } else return 0; // Let the server know that this was a valid command return 1; } [/pawn] respectiv de la aceasta linie [pawn]SendClientMessageToAll(0x00FF00FF, nume, playerid "Adminul %s[%i] a reparat toate masinile");[/pawn]
  6. foarte bun tutorialul ai +1 rep ma ajutat foarte mult
  7. ai defini MaxStep dupa courier in ppc_defines? :-?
  8. vasy

    Comanda necunoscuta

    multumesc mult ai +1 de ma mine
  9. vasy

    Comanda /ban

    [pawn]if (strcmp("/ban", cmdtext, true, 6) == 0) { // Setup local variables new PlayerToBan, Days, Hours, Reason[128], TotalBanTime, Msg[128], Name[24], AdminName[24]; // Send the command to all admins so they can see it SendAdminText(playerid, "/ban", params); // Check if the player has logged in if (APlayerData[playerid][LoggedIn] == true) { // Check if the player's admin-level is at least 3 if (APlayerData[playerid][PlayerLevel] >=Aici pui la ce level de admin sa fie comanda) { if (sscanf(params, "uiis[128]", PlayerToBan, Days, Hours, Reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/ban <PlayerToBan> <Days> <Hours> <Reason>\""); else { if (IsPlayerConnected(PlayerToBan)) { // Get the names of the player and the admin who executed the ban GetPlayerName(playerid, AdminName, sizeof(AdminName)); GetPlayerName(PlayerToBan, Name, sizeof(Name)); // Increase the number of bans APlayerData[PlayerToBan][bans]++; // Calculate the total bantime (when the player can login again) TotalBanTime = (Days * 86400) + (Hours * 3600) + gettime(); // Check if this is the player's 5th ban if (APlayerData[PlayerToBan][bans] == 5) APlayerData[PlayerToBan][banTime] = 2147483640; // Make the ban permanent (as high as it can go) else APlayerData[PlayerToBan][banTime] = TotalBanTime; // Store this value for the player // Inform the player about his ban // Check if this is the player's 5th ban if (APlayerData[PlayerToBan][bans] == 5) { format(Msg, 128, "You have been banned permanently by %s, this was your 5th ban", AdminName); SendClientMessage(PlayerToBan, 0x808080FF, Msg); } else { format(Msg, 128, "You have been banned by %s for %i days and %i hours", AdminName, Days, Hours); SendClientMessage(PlayerToBan, 0x808080FF, Msg); format(Msg, 128, "Reason: %s", Reason); SendClientMessage(PlayerToBan, 0x808080FF, Msg); format(Msg, 128, "You've been banned %i times now, 5th time is permament", APlayerData[PlayerToBan][bans]); SendClientMessage(PlayerToBan, 0x808080FF, Msg); } // Kick the player (his data will be saved) Kick(PlayerToBan); // Inform everybody else which player was banned and for how long format(Msg, 128, "%s %s has banned %s for %i days and %i hours", AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminName, Name, Days, Hours); SendClientMessageToAll(0x808080FF, Msg); } } } else return 0; } else return 0; return 1; }[/pawn] nu ma prea pricep la strcmp incearca acum :)
  10. vasy

    [MAP]Groove Street

    puteai sa convertesti si tu codul ala oricum acceptabila 6/10
  11. vasy

    Comanda necunoscuta

    [pawn]public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(!success) { new Str[256]; format(Str,256,"EROARE:Comanda {204096}%s{962020} nu exista!Incercati /help si /cmds",cmdtext); SendClientMessage(playerid,0x962020,Str); } return 1; }[/pawn] cum as putea sa fa dilog boc msg
  12. vasy

    Comanda /ban

    dami linia asta 17137
  13. vasy

    Comanda /ban

    [pawn]COMMAND:ban(playerid, params[]) { // Setup local variables new PlayerToBan, Days, Hours, Reason[128], TotalBanTime, Msg[128], Name[24], AdminName[24]; // Send the command to all admins so they can see it SendAdminText(playerid, "/ban", params); // Check if the player has logged in if (APlayerData[playerid][LoggedIn] == true) { // Check if the player's admin-level is at least 3 if (APlayerData[playerid][PlayerLevel] >=Aici pui la ce level de admin sa fie comanda) { if (sscanf(params, "uiis[128]", PlayerToBan, Days, Hours, Reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/ban <PlayerToBan> <Days> <Hours> <Reason>\""); else { if (IsPlayerConnected(PlayerToBan)) { // Get the names of the player and the admin who executed the ban GetPlayerName(playerid, AdminName, sizeof(AdminName)); GetPlayerName(PlayerToBan, Name, sizeof(Name)); // Increase the number of bans APlayerData[PlayerToBan][bans]++; // Calculate the total bantime (when the player can login again) TotalBanTime = (Days * 86400) + (Hours * 3600) + gettime(); // Check if this is the player's 5th ban if (APlayerData[PlayerToBan][bans] == 5) APlayerData[PlayerToBan][banTime] = 2147483640; // Make the ban permanent (as high as it can go) else APlayerData[PlayerToBan][banTime] = TotalBanTime; // Store this value for the player // Inform the player about his ban // Check if this is the player's 5th ban if (APlayerData[PlayerToBan][bans] == 5) { format(Msg, 128, "You have been banned permanently by %s, this was your 5th ban", AdminName); SendClientMessage(PlayerToBan, 0x808080FF, Msg); } else { format(Msg, 128, "You have been banned by %s for %i days and %i hours", AdminName, Days, Hours); SendClientMessage(PlayerToBan, 0x808080FF, Msg); format(Msg, 128, "Reason: %s", Reason); SendClientMessage(PlayerToBan, 0x808080FF, Msg); format(Msg, 128, "You've been banned %i times now, 5th time is permament", APlayerData[PlayerToBan][bans]); SendClientMessage(PlayerToBan, 0x808080FF, Msg); } // Kick the player (his data will be saved) Kick(PlayerToBan); // Inform everybody else which player was banned and for how long format(Msg, 128, "%s %s has banned %s for %i days and %i hours", AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminName, Name, Days, Hours); SendClientMessageToAll(0x808080FF, Msg); } } } else return 0; } else return 0; return 1; }[/pawn] Sper ca ti-am fost de folos
  14. nu merge am incercat si eu si nu merge daca sterg acel return merge dar da erroare cmdtext undfiend obiect sau cum e
  15. in fine lasati-o balta :-j raman cu el asa
  16. [pawn]C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(572) : error 017: undefined symbol "r_OPENX" C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(573) : error 017: undefined symbol "r_OPENY" C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(574) : error 017: undefined symbol "r_OPENZ" C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(575) : error 017: undefined symbol "r_CloseX" C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(576) : error 017: undefined symbol "r_CloseY" C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(577) : error 017: undefined symbol "r_CloseZ" C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(559) : warning 203: symbol is never used: "OZ" C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(559) : warning 203: symbol is never used: "OY" C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(559) : warning 203: symbol is never used: "OX"[/pawn]
  17. serios de atatea zile si nimeni?
  18. Mai facut sa fac poze si mai starnit in mai multe privinte daca am puteti ajuta ) Deci eu am asa sistemu automat si vreau sa il fac asa [img width=500 height=281] Dar pe langa astea mai sunt interesat cum a facut sa se vada la fuel asa cu verde ma omoara chesti aia si la acel textdraw cum a adaugat chestia aia porocalie cu orice ma puteti ajuta e bine primit :X
  19. scriptul acesta face ca sa se miste un obiect in sus si in jos si sa ia bani cand treci prin acel loc si sa lasa obiectul in jos (automat) si se ridica automat dar eu vreau sa il pun pe rotatie adica sa nu se mai ridice in sus si in jos sa fac rotatie ca o bariera :)
  20. nu e pentru tot sv e doar pt mine nu? Dar se poate sa il pui la tot sv?
  21. Buna ziua samp.ro am si eu un script automat car enu e facut de mine e din GM Asa e el si as vrea sa il modific un pic imi puteti da niste indicatii [pawn]forward Toll(); public Toll() { // Loop through all players for(new playerid; playerid < MAX_PLAYERS; playerid++) { // If the player isn't connected, skip to the next player if(APlayerData[playerid][LoggedIn] == false) continue; // Check if the player is the driver of a vehicle if (GetPlayerVehicleSeat(playerid) == 0) { // Loop through all toll-gates for (new TollGate; TollGate < MAX_TOLLGATES; TollGate++) { // Check if this toll-gate exists if (ATollGates[TollGate][GateID] != 0) { // Check if the player is in range of the tollgate if(IsPlayerInRangeOfPoint(playerid, 7.5, ATollGates[TollGate][CloseX], ATollGates[TollGate][CloseY], ATollGates[TollGate][CloseZ])) { // Check if the toll-gate is closed if(ATollGates[TollGate][GateStatus] == 0) { // Open the gate MoveObject(ATollGates[TollGate][GateID], ATollGates[TollGate][OpenX], ATollGates[TollGate][OpenY], ATollGates[TollGate][OpenZ], 3.0); // Set status to OPEN ATollGates[TollGate][GateStatus] = 1; // Let the player pay the toll RewardPlayer(playerid, -ATollGates[TollGate][TollPrice], 0); new string[50]; format(string, sizeof(string), TXT_PlayerPaysToll, ATollGates[TollGate][TollPrice]); GameTextForPlayer(playerid, string, 3000, 4); // Start a timer that closes the gate after 5 seconds SetTimerEx("CloseGate", 5000, false, "i", TollGate); } } } } } } } forward CloseGate(TollGate); public CloseGate(TollGate) { // Close the gate MoveObject(ATollGates[TollGate][GateID], ATollGates[TollGate][CloseX], ATollGates[TollGate][CloseY], ATollGates[TollGate][CloseZ], 3.0); // Set status to CLOSED ATollGates[TollGate][GateStatus] = 0; } [/pawn] de aici o adaug [pawn]AddTollGate(3578, 1801.00, 692.66, 10.00, 1801.00, 692.66, 15.00, 0.0, 0.0, 350.25, 30);[/pawn] si mai este chesti aceasta [pawn]// This function is used to add toll-gates to the map AddTollGate(GateModel, Float:OX, Float:OY, Float:OZ, Float:CX, Float:CY, Float:CZ, Float:RX, Float:RY, Float:RZ, TollMoney) { // Loop through all tollgates for (new TollGate; TollGate < MAX_TOLLGATES; TollGate++) { // Check if this is an empty entry if (ATollGates[TollGate][GateID] == 0) { // Create a new object for the toll-gate in it's closed status ATollGates[TollGate][GateID] = CreateObject(GateModel, CX, CY, CZ, RX, RY, RZ); // Set data ATollGates[TollGate][TollPrice] = TollMoney; // Set the price to pay for passing the toll-gate ATollGates[TollGate][GateStatus] = 0; // Set the status to CLOSED ATollGates[TollGate][OpenX] = OX; // Save the OpenX coordinates ATollGates[TollGate][OpenY] = OY; // Save the OpenY coordinates ATollGates[TollGate][OpenZ] = OZ; // Save the OpenZ coordinates ATollGates[TollGate][CloseX] = CX; // Save the CloseX coordinates ATollGates[TollGate][CloseY] = CY; // Save the CloseY coordinates ATollGates[TollGate][CloseZ] = CZ; // Save the CloseZ coordinates break; // Stop the for-loop } } }[/pawn] Tin sa precizes ca sunt in include diferite aceste chestii Bun inteleg cum functioneaza dar eu vreau sa se deschida in rotatie pentru a adauga bariera de aceea cu alb si rosu acest script e facut sa se deschida in sus si in jos eu vreau stil rotatie ma puteti ajuta?
  22. vasy

    dialog login

    L-ai ajutat pe prietenul meu si mia spus el cum sa fac multumim!! Dati TC
×
×
  • 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.