Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public VaildFishPlace(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(IsPlayerInRangeOfPoint(playerid, 4,403.8266,-2088.7598,7.8359) || IsPlayerInRangeOfPoint(playerid, 4,398.7553,-2088.7490,7.8359))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 4,396.2197,-2088.6692,7.8359) || IsPlayerInRangeOfPoint(playerid, 4,391.1094,-2088.7976,7.8359))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 4,383.4157,-2088.7849,7.8359))
- {
- return 1;
- }
- }
- return 0;
- }
- 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(VaildFishPlace(playerid) return SendClientMessage(playerid, COLOR_LGREEN, "Eroare: Nu esti intr-o locatie buna, du-te la checkpoint-ul de pe harta.");
- new locatie = random(5);
- switch(locatie)
- {
- case 0: SetPlayerCheckpoint(playerid,403.8266,-2088.7598,7.8359,4.0),CP[playerid] = 43;
- case 1: SetPlayerCheckpoint(playerid,398.7553,-2088.7490,7.8359,4.0),CP[playerid] = 43;
- case 2: SetPlayerCheckpoint(playerid,396.2197,-2088.6692,7.8359,4.0),CP[playerid] = 43;
- case 3: SetPlayerCheckpoint(playerid,391.1094,-2088.7976,7.8359,4.0),CP[playerid] = 43;
- case 4: SetPlayerCheckpoint(playerid,383.4157,-2088.7849,7.8359,4.0),CP[playerid] = 43;
- }
- new need = 15*GetPlayerSkill(playerid);
- if(HaveFish[playerid] >= need) return SCM(playerid, COLOR_LGREEN, "Eroare: Ai prea multe kilograme de peste!");
- GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~w~Pescuiesti...",15000,3);
- 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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement