Code
CMD:fishing(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(Spieler[playerid][pJob] != 5)return SendClientMessage(playerid, COLOR_GREY, "Du bist kein Hochseefischer.");
if(!IsVehicleABoat(vehicleid))return SendClientMessage(playerid, COLOR_GREY, "Du bist in keinem Hochseefischer-Boot.");
ShowPlayerDialog(playerid, DIALOG_HOCHSEEFISHER, DIALOG_STYLE_LIST, "Hochseefischer", "Reuse 1: Auslegen\nReuse 2: Auslegen\nReuse 3: Auslegen\nReuse 4: Auslegen\nReuse 5: Auslegen", "Auswählen", "Abbrechen");
return 1;
}
Code
case DIALOG_HOCHSEEFISHER:
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(response)
{
if(listitem == 0)// Reuse 1
{
if(pTrap[playerid][0] == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 100.0, 159.1252, -2006.0305, -0.0153))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah am Bootsteg.");
if(IsPlayerInRangeOfPoint(playerid, 100.0, pTrapPosX[playerid][1], pTrapPosY[playerid][1], pTrapPosZ[playerid][1]))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah an einer Reuse.");
if(IsPlayerInRangeOfPoint(playerid, 100.0, pTrapPosX[playerid][2], pTrapPosY[playerid][2], pTrapPosZ[playerid][2]))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah an einer Reuse.");
pTrapPosX[playerid][0] = X;
pTrapPosY[playerid][0] = Y;
pTrapPosZ[playerid][0] = Z;
pTrap[playerid][0] = 1;
pTrapFish[playerid][0] = 0;
SendClientMessage(playerid, COLOR_GREY, "Du legst Reuse 1 an dieser Position aus.");
SendClientMessage(playerid, COLOR_GREY, "Bitte warten..");
}
}
if(listitem == 1) //Reuse 2
{
if(pTrap[playerid][1] == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 100.0, 159.1252, -2006.0305, -0.0153))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah am Bootsteg.");
if(IsPlayerInRangeOfPoint(playerid, 100.0, pTrapPosX[playerid][1], pTrapPosY[playerid][1], pTrapPosZ[playerid][1]))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah an einer Reuse.");
if(IsPlayerInRangeOfPoint(playerid, 100.0, pTrapPosX[playerid][2], pTrapPosY[playerid][2], pTrapPosZ[playerid][2]))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah an einer Reuse.");
pTrapPosX[playerid][0] = X;
pTrapPosY[playerid][0] = Y;
pTrapPosZ[playerid][0] = Z;
pTrap[playerid][0] = 1;
pTrapFish[playerid][0] = 0;
SendClientMessage(playerid, COLOR_GREY, "Du legst Reuse 2 an dieser Position aus.");
SendClientMessage(playerid, COLOR_GREY, "Bitte warten..");
}
}
if(listitem == 2) //Reuse 3
{
if(pTrap[playerid][2] == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 100.0, 159.1252, -2006.0305, -0.0153))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah am Bootsteg.");
if(IsPlayerInRangeOfPoint(playerid, 100.0, pTrapPosX[playerid][1], pTrapPosY[playerid][1], pTrapPosZ[playerid][1]))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah an einer Reuse.");
if(IsPlayerInRangeOfPoint(playerid, 100.0, pTrapPosX[playerid][2], pTrapPosY[playerid][2], pTrapPosZ[playerid][2]))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah an einer Reuse.");
pTrapPosX[playerid][0] = X;
pTrapPosY[playerid][0] = Y;
pTrapPosZ[playerid][0] = Z;
pTrap[playerid][0] = 1;
pTrapFish[playerid][0] = 0;
SendClientMessage(playerid, COLOR_GREY, "Du legst Reuse 3 an dieser Position aus.");
SendClientMessage(playerid, COLOR_GREY, "Bitte warten..");
}
}
if(listitem == 3) //Reuse 4
{
if(pTrap[playerid][3] == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 100.0, 159.1252, -2006.0305, -0.0153))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah am Bootsteg.");
if(IsPlayerInRangeOfPoint(playerid, 100.0, pTrapPosX[playerid][1], pTrapPosY[playerid][1], pTrapPosZ[playerid][1]))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah an einer Reuse.");
if(IsPlayerInRangeOfPoint(playerid, 100.0, pTrapPosX[playerid][2], pTrapPosY[playerid][2], pTrapPosZ[playerid][2]))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah an einer Reuse.");
pTrapPosX[playerid][0] = X;
pTrapPosY[playerid][0] = Y;
pTrapPosZ[playerid][0] = Z;
pTrap[playerid][0] = 1;
pTrapFish[playerid][0] = 0;
SendClientMessage(playerid, COLOR_GREY, "Du legst Reuse 4 an dieser Position aus.");
SendClientMessage(playerid, COLOR_GREY, "Bitte warten..");
}
}
if(listitem == 4) //Reuse 5
{
if(pTrap[playerid][4] == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 100.0, 159.1252, -2006.0305, -0.0153))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah am Bootsteg.");
if(IsPlayerInRangeOfPoint(playerid, 100.0, pTrapPosX[playerid][1], pTrapPosY[playerid][1], pTrapPosZ[playerid][1]))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah an einer Reuse.");
if(IsPlayerInRangeOfPoint(playerid, 100.0, pTrapPosX[playerid][2], pTrapPosY[playerid][2], pTrapPosZ[playerid][2]))return SendClientMessage(playerid, COLOR_GREY, "Du bist zu nah an einer Reuse.");
pTrapPosX[playerid][0] = X;
pTrapPosY[playerid][0] = Y;
pTrapPosZ[playerid][0] = Z;
pTrap[playerid][0] = 1;
pTrapFish[playerid][0] = 0;
SendClientMessage(playerid, COLOR_GREY, "Du legst Reuse 5 an dieser Position aus.");
SendClientMessage(playerid, COLOR_GREY, "Bitte warten..");
}
}
}
}
Alles anzeigen
Code
CMD:showtrap(playerid)
{
new string[128];
strdel(DialogString, 0, sizeof(DialogString));
if(pTrap[playerid][0] == 1){
format(string, sizeof(string), COLOR_HEX_WHITE"Erstes Netz: "COLOR_HEX_GREEN"Ausgeworfen"COLOR_HEX_WHITE" - Stand: %d/250\n", pTrapFish[playerid][0]);
strcat(DialogString, string);
}
else if(pTrap[playerid][0] == 0){
strcat(DialogString, COLOR_HEX_WHITE"Erstes Netz: "COLOR_HEX_RED"Nicht Ausgeworfen\n");
}
if(pTrap[playerid][1] == 1){
format(string, sizeof(string), COLOR_HEX_WHITE"Zweites Netz: "COLOR_HEX_GREEN"Ausgeworfen"COLOR_HEX_WHITE" - Stand: %d/250\n", pTrapFish[playerid][1]);
strcat(DialogString, string);
}
else if(pTrap[playerid][1] == 0){
strcat(DialogString, COLOR_HEX_WHITE"Zweites Netz: "COLOR_HEX_RED"Nicht Ausgeworfen\n");
}
if(pTrap[playerid][2] == 1){
format(string, sizeof(string), COLOR_HEX_WHITE"Drittes Netz: "COLOR_HEX_GREEN"Ausgeworfen"COLOR_HEX_WHITE" - Stand: %d/250\n", pTrapFish[playerid][2]);
strcat(DialogString, string);
}
else if(pTrap[playerid][2] == 0){
strcat(DialogString, COLOR_HEX_WHITE"Drittes Netz: "COLOR_HEX_RED"Nicht Ausgeworfen\n");
}
if(pTrap[playerid][3] == 1){
format(string, sizeof(string), COLOR_HEX_WHITE"Drittes Netz: "COLOR_HEX_GREEN"Ausgeworfen"COLOR_HEX_WHITE" - Stand: %d/250\n", pTrapFish[playerid][3]);
strcat(DialogString, string);
}
else if(pTrap[playerid][3] == 0){
strcat(DialogString, COLOR_HEX_WHITE"Drittes Netz: "COLOR_HEX_RED"Nicht Ausgeworfen\n");
}
if(pTrap[playerid][4] == 1){
format(string, sizeof(string), COLOR_HEX_WHITE"Drittes Netz: "COLOR_HEX_GREEN"Ausgeworfen"COLOR_HEX_WHITE" - Stand: %d/250\n", pTrapFish[playerid][4]);
strcat(DialogString, string);
}
else if(pTrap[playerid][4] == 0){
strcat(DialogString, COLOR_HEX_WHITE"Drittes Netz: "COLOR_HEX_RED"Nicht Ausgeworfen\n");
}
ShowPlayerDialog(playerid, DIALOG_SHOWTRAP, DIALOG_STYLE_LIST, "Netze", DialogString, "Anzeigen", "Schließen");
return 1;
}
Alles anzeigen
Hallo, wen ich eine Reuse auslege ja...
geht es aber wen ich die Zweite auslege funktioniert das nicht?
wird mir angezeigt das Sie nicht auslegt habe obwohl ich es habe