Jump to content

Problema /fish


Recommended Posts

Salut, de 2 zile vreau sa fac un sistem de pescuit, ca atunci cand dai /fish si nu esti intr-o locatie potrivita(nu esti in una dintre cele 5 locatii) sa iti dea un mesaj ca nu esti intr-o locatie buna si sa iti puna un checkpoint random pe marea din apropierea Santa Maria Beach la una dintre cele 5 locatii, dar nu reusesc.

Aici aveti ce am reusit sa fac pana acum corect:

CMD:fish(playerid, params[]) {
    if(PlayerInfo[playerid][pJob] != 11) return SendClientMessage(playerid, COLOR_GREY, "Nu esti pescar!");
    if(JobWorking[playerid] == 0) return 1;
    if(!IsPlayerNearVehicle(playerid,JobVehicle[playerid],10)) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu esti langa barca ta!");
    if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu poti pescui dintr-un vehicul!");
    if(StartFish[playerid] == 1) return 1;
    if(Undita[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu ai o undita!");
    if(Momeala[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu ai momeala!");
    if(!PlayerToPoint(125.0, playerid, 665.7314,-2128.0508,-0.4707) {
        SendClientMessage(playerid, COLOR_LGREEN, "Eroare: Nu esti intr-o locatie buna, du-te la checkpoint-ul de pe harta.");
        SetPlayerCheckpointEx(playerid, 665.7314,-2128.0508,-0.4707);
        return 1;
    new need = 15*GetPlayerSkill(playerid);
    if(HaveFish[playerid] >= need) return SCM(playerid, COLOR_LGREEN, "Eroare: Ai prea multe kilograme de peste!");
    SetTimerEx("Fish", 15000, 0, "d", playerid);
    //TogglePlayerControllable(playerid, 0);
    ApplyAnimation(playerid, "SAMP", "FishingIdle", 3.0,1,1,0,0,0);
    SetPlayerAttachedObject(playerid, 9, 18632,6,0.079376,0.037070,0.007706,181.482910,0.000000,0.000000,1.000000,1.000000,1.000000);
    StartFish[playerid] = 1;
    Freezed[playerid] = 1;
    Momeala[playerid] --;
    return 1;

Link to comment
Share on other sites

  • Mister locked this topic
This topic is now closed to further replies.
  • 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.