Hallo zusammen,
1. Ich arbeite momentan an einem System, in dem kann man Goldbarren in der Wüste erbeuten.. nur 1 Befehl funktioniert nicht so ganz vielleicht habe ich ein Denkfehler.
Der befehl /graben sagt mir ständig das ich nicht im Checkpoint sei obwohl ich drin stehe ?
new Float:buddeln[40][3] = {
{-152.4400,1846.9717,29.2687},//1
{-156.7346,1836.0719,35.8069},//2
{-159.3667,1819.4857,41.8780},//3
{-167.8414,1811.2115,47.8237},//4
{-170.0450,1801.4122,52.2505},//5
{-161.8423,1793.4242,53.3616},//6
{-158.1084,1784.1903,54.7704},//7
{-155.6175,1774.2726,55.9601},//8
{-161.5969,1759.1898,54.8455},//9
{-169.1723,1744.1102,54.3982},//10
{-179.5686,1728.7390,56.0567},//11
{-194.2571,1725.0474,57.2687},//12
{-211.9686,1723.6018,59.9577},//13
{-232.1001,1724.2982,65.5360},//14
{-249.9986,1729.4911,70.9397},//15
{-256.7750,1744.8335,79.7419},//16
{-263.5448,1757.6102,85.9440},//17
{-248.7828,1757.2014,91.1319},//18
{-236.3986,1762.3973,97.1517},//19
{-241.1614,1779.8954,98.7132},//20
{-158.1247,1657.6960,15.5781},//21
{-159.1710,1646.9923,17.1366},//22
{-161.2974,1631.9705,13.9626},//23
{-167.4120,1617.1793,16.0704},//24
{-179.3784,1609.5249,16.3702},//25
{-196.5753,1614.7747,18.1386},//26
{-208.7043,1622.6949,20.1674},//27
{-221.8707,1630.6270,23.0112},//28
{-224.7464,1643.3513,25.0204},//29
{-214.8419,1654.8787,24.1355},//30
{-217.1145,1666.9935,24.9542},//31
{-230.0202,1671.4265,28.5422},//32
{-240.1701,1680.7133,28.0925},//33
{-252.4414,1677.7377,27.4495},//34
{-264.8186,1666.5928,26.4511},//35
{-277.9287,1668.5056,27.4045},//36
{-287.5557,1678.8755,26.5148},//37
{-290.7267,1693.0597,28.3341},//38
{-300.0582,1705.0482,32.0989},//39
{-316.0493,1698.2067,34.0618}//40
};
ocmd:graben(playerid,params[])
{
if(IsPlayerConnected(playerid))
{
new cp = random(40);
if(IsPlayerInRangeOfPoint(playerid,5.0,buddeln[cp][0],buddeln[cp][1],buddeln[cp][2]))
{
if(sSpieler[playerid][Schaufel] < 1)
{
SendClientMessage(playerid,ROT,"Du hast keine Schaufeln mehr, kaufe dir neue im 24/7 Shop!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid,ROT,"Du sitz in/auf einem Fahrzeug!");
return 1;
}
new randomvar=random(3);
switch(randomvar)
{
case 0:
{
sSpieler[playerid][Schaufel] -= 1;
SendClientMessage(playerid,GOLD,"Du hast einen Goldbarren gefunden, du kannst ihn behalten, an andere Spieler verkaufen.");
SendClientMessage(playerid,GOLD,"oder auf dem Schwarzmarkt verkaufen.");
sSpieler[playerid][Goldbarre] += 1;
DisablePlayerCheckpoint(playerid);
}
case 1:
{
sSpieler[playerid][Schaufel] -= 1;
SendClientMessage(playerid,HELLBLAU,"Leider hast du nichts gefunden, aber nicht aufgeben der Schatz wartet ;)");
DisablePlayerCheckpoint(playerid);
}
case 2:
{
SendClientMessage(playerid,HELLBLAU,"Du hast eine Tasche gefunden, vielleicht ist was besonderes drin.");
SendClientMessage(playerid,HELLBLAU,"Mit /tasche kannst du sie öffnen.");
sSpieler[playerid][Schaufel] -= 1;
sSpieler[playerid][Tasche] += 1;
DisablePlayerCheckpoint(playerid);
}
}
}
else
{
SendClientMessage(playerid,GRAU,"Du bist nicht in der Nähe!");
return 1;
}
}
return 1;
}
ocmd:bd(playerid,params[])
{
if(IsPlayerConnected(playerid))
{
if(sSpieler[playerid][Schaufel] < 1)
{
SendClientMessage(playerid,ROT,"Du hast keine Schaufeln mehr, kaufe dir neue im 24/7 Shop!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid,ROT,"Du sitz in/auf einem Fahrzeug!");
return 1;
}
new cp = random(40);
SetPlayerCheckpoint(playerid, buddeln[cp][0], buddeln[cp][1] ,buddeln[cp][2],5.0);
SendClientMessage(playerid,HELLBLAU,"Geh zum Checkpoint und tippe /graben ein. Viel Erfolg ;)");
}
return 1;
}
2. Es gibt 40 Saveboxen auf dem Server um die zufinden habe ich ein Befehl erstellt aber der crasht den Server sobald ich den eingebe.
new Float:Saveboxs[][3] = {
{-1834.7000000,327.5000000,16.7000000},
{-2932.1001000,453.8999900,3.6000000},
{-2942.3999000,1110.8000000,5.3000000},
{-1971.9000000,2601.7000000,48.8000000},
{-813.5999800,2345.8000000,119.8000000},
{-364.5000000,1593.4000000,76.5000000},
{-1356.4000000,2141.2000000,41.4000000},
{-792.0999800,2761.5000000,50.4000000},
{1564.4000000,2780.8999000,10.4000000},
{2627.0000000,2850.8999000,10.4000000},
{2613.2000000,718.5999800,10.4000000},
{2723.6001000,-1828.2000000,11.4000000},
{2471.6001000,-2697.7000000,2.6000000},
{1450.0000000,-2271.8999000,13.1000000},
{1120.4000000,-1886.5000000,36.3000000},
{707.7999900,-1472.7000000,5.0000000},
{1100.3000000,-665.4000200,109.7000000},
{1544.5000000,-1374.7000000,329.6000100},
{2112.2000000,-1500.5000000,10.0000000},
{2836.2000000,-1463.3000000,40.3000000},
{2840.1001000,-2395.8000000,20.0000000},
{2791.8999000,-2489.6001000,14.6000000},
{-1450.9000000,-217.8999900,13.7000000},
{-2508.0000000,-675.2000100,138.8999900},
{-2685.2000000,1428.9000000,6.6000000},
{-1688.6000000,1219.1000000,20.2000000},
{-1898.1000000,-127.0000000,22.8000000},
{-2229.3000000,138.8999900,34.9000000},
{-2053.7000000,309.7999900,41.5000000},
{-1724.2000000,543.7000100,33.5000000},
{-1797.7000000,372.5000000,0.1000000},
{1122.4000000,1463.7000000,5.4000000},
{1333.8000000,1250.2000000,10.4000000},
{1773.6000000,623.7000100,10.4000000},
{2439.3999000,-152.3999900,31.4000000},
{2114.2000000,-354.2999900,58.3000000},
{2243.6001000,1132.4000000,10.4000000},
{1990.1000000,1804.1000000,11.5000000},
{2561.5000000,2301.3999000,10.6000000},
{2119.7000000,1497.0000000,10.4000000}
};
ocmd:sb(playerid,params[])
{
if(IsPlayerConnected(playerid))
{
ShowPlayerDialog(playerid,SBLISTE,DIALOG_STYLE_LIST,"Savebox - Liste","Box1,Box2,Box3,Box4,Box5,Box6,Box7,Box8,Box9,Box10,Box11,Box12,Box13,Box14,Box15,Box16,Box17,Box18,Box19,Box20,Box21,Box22,Box23,Box24,Box25,Box26,Box27,Box28,Box29,Box30,Box31,Box32,Box33,Box34,Box35,Box36,Box37,Box38,Box39,Box40","Wählen","");
}
return 1;
}
if(dialogid == SBLISTE)
{
if(response)
{
switch(listitem)
{
case 0:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-1834.7000000,327.5000000,16.7000000, 5);
}
case 1:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-2932.1001000,453.8999900,3.6000000, 5);
}
case 2:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-2942.3999000,1110.8000000,5.3000000, 5);
}
case 3:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-1971.9000000,2601.7000000,48.8000000, 5);
}
case 4:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-813.5999800,2345.8000000,119.8000000, 5);
}
case 5:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-364.5000000,1593.4000000,76.5000000, 5);
}
case 6:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-1356.4000000,2141.2000000,41.4000000, 5);
}
case 7:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-792.0999800,2761.5000000,50.4000000, 5);
}
case 8:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,1564.4000000,2780.8999000,10.4000000, 5);
}
case 9:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2627.0000000,2850.8999000,10.4000000, 5);
}
case 10:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2613.2000000,718.5999800,10.4000000, 5);
}
case 11:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2723.6001000,-1828.2000000,11.4000000, 5);
}
case 12:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2471.6001000,-2697.7000000,2.6000000, 5);
}
case 13:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,1450.0000000,-2271.8999000,13.1000000, 5);
}
case 14:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,1120.4000000,-1886.5000000,36.3000000, 5);
}
case 15:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,707.7999900,-1472.7000000,5.0000000, 5);
}
case 16:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,1100.3000000,-665.4000200,109.7000000, 5);
}
case 17:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,1544.5000000,-1374.7000000,329.6000100, 5);
}
case 18:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2112.2000000,-1500.5000000,10.0000000, 5);
}
case 19:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2836.2000000,-1463.3000000,40.3000000, 5);
}
case 20:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2840.1001000,-2395.8000000,20.0000000, 5);
}
case 21:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2791.8999000,-2489.6001000,14.6000000, 5);
}
case 22:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-1450.9000000,-217.8999900,13.7000000, 5);
}
case 23:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-2508.0000000,-675.2000100,138.8999900, 5);
}
case 24:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-2685.2000000,1428.9000000,6.6000000, 5);
}
case 25:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-1688.6000000,1219.1000000,20.2000000, 5);
}
case 26:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-1898.1000000,-127.0000000,22.8000000, 5);
}
case 27:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-2229.3000000,138.8999900,34.9000000, 5);
}
case 28:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-2053.7000000,309.7999900,41.5000000, 5);
}
case 29:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-1724.2000000,543.7000100,33.5000000, 5);
}
case 30:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,-1797.7000000,372.5000000,0.1000000, 5);
}
case 31:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,1122.4000000,1463.7000000,5.4000000, 5);
}
case 32:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,1333.8000000,1250.2000000,10.4000000, 5);
}
case 33:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,1773.6000000,623.7000100,10.4000000, 5);
}
case 34:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2439.3999000,-152.3999900,31.4000000, 5);
}
case 35:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2114.2000000,-354.2999900,58.3000000, 5);
}
case 36:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2243.6001000,1132.4000000,10.4000000, 5);
}
case 37:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,1990.1000000,1804.1000000,11.5000000, 5);
}
case 38:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2561.5000000,2301.3999000,10.6000000, 5);
}
case 39:
{
GameTextForPlayer(playerid,"~w~ROUTE WIRD ~g~KALKULIERT",2000,4);
SetPlayerCheckpoint(playerid,2119.7000000,1497.0000000,10.4000000, 5);
}
}
}
}
Ich danke euch für die Hilfe und einen schönen Abend wünsche ich allen