Jump to content
  • 0

/fish burned


caltabos

Question

ba nu stiu daca vi s-a mai intamplat dar mie ci si la restul playerilor nu le merge comanda /fish, nu stiu de ce!

}
CMD:fish(playerid, params[]) {
	if(PlayerInfo[playerid][pJob] != 11) return SendClientMessage(playerid, COLOR_RED, "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, 823.0512,-2257.5833,1.1817)) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu esti intr-o locatie buna!");
	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;
}

m-am uitat prin gm original(burned) ne-editat si nu lipsea nimic!sa-mp-067.png.d5c8d1deab49b759077f86783ad66812.png

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

asta ar fi o funcite

function Fish(playerid) {
	new x, string[180];
	if(!IsPlayerConnected(playerid)) return 1;
	if(PlayerInfo[playerid][pJob] == 11) {
		StartFish[playerid] = 0;
		TogglePlayerControllable(playerid, 1);
		Freezed[playerid] = 0;		
	    RemovePlayerAttachedObject(playerid, 9);
		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!");			
		
		x = 7 + random(13);
		new rar = random(500);
		new need = 15*GetPlayerSkill(playerid);
		if(rar >= 495) HaveFish[playerid] = 0;
		else HaveFish[playerid] += x;
		
		if(rar >= 495) {	
			format(string, sizeof(string), "* %s a prins un rechin.", GetName(playerid), FormatNumber(x));
			NearMessage(playerid, COLOR_PURPLE, string);	
			SetPlayerHealth(playerid, 0);
			x = 0;
		}
		else {
			if(HaveFish[playerid] < need) {
				format(string, sizeof(string), "Pentru a putea vinde pestii, iti mai trebuie %d kg.", need-HaveFish[playerid]);
				SCM(playerid, -1, string);
			}
			else {
				SCM(playerid, COLOR_YELLOW, "Du-te la checkpoint-ul de pe mapa!");
				SetPlayerCheckpointEx(playerid, 840.5792,-2150.7822,1.1482, 10.0);
				CP[playerid] = 373;
				HaveFish[playerid] = need;
			}		
			format(string, sizeof(string), "* %s a prins un peste de %d kg.", GetName(playerid), x);
			NearMessage(playerid, COLOR_PURPLE, string);				
		}	
		if(PlayerInfo[playerid][pMember] == 0) {
			for(new m; m < 2; m++) {
				if(PlayerInfo[playerid][pDailyMission][m] == 15 || PlayerInfo[playerid][pDailyMission][m] == 16) CheckMission(playerid, m);
			}					
		}
		for(new m; m < 2; m++) {
			if(PlayerInfo[playerid][pDailyMission][m] == 2) CheckMission(playerid, m);
		}		
	}
	return 1;
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.