if(pickupid==hunter)
{
new Float:x,Float:y,Float:z;
GetVehiclePos(playerid,x,y,z);
CreateVehicle(425,x,y,z+100,1,1,-1,0);
return 1;
}
re
hunter=CreatePickup(1239,14,1284.6592,2533.6265,110.6824,-1);
Warum?
if(pickupid==hunter)
{
new Float:x,Float:y,Float:z;
GetVehiclePos(playerid,x,y,z);
CreateVehicle(425,x,y,z+100,1,1,-1,0);
return 1;
}
re
hunter=CreatePickup(1239,14,1284.6592,2533.6265,110.6824,-1);
Warum?
Taucht es garnicht erst auf oder passiert nichts/nicht das was du willst wenn man reinläuft?
Das Pickup taucht nicht auf und das passirt auch nicht
wo erstellst du das Pickup?
In der wüste
Joint ich zeige euch
84.38.75.249:9991
Zeig mal wo das hier drinsteht.
hunter=CreatePickup(1239,14,1284.6592,2533.6265,110.6824,-1);
Muss unter Gamemodeinit
Ist das mit dem type 14 beabsichtigt?
Sogar wenn es erscheinen würde hättest du mit dem Code aber ein Problem,
ich denke du meinst entweder GetPlayerPos(playerid,x,y,z) oder GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z).
GetVehiclePos(playerid,...) passt nicht zusammen
Edit: versuch statt der -1 mal die 0 und guck mal obs da ist
in der wiki steht zwar, dass -1 alle welten zeigt aber wer weiß
MfG
Virtuelle Welt auf 0
Nein ich meine wo genau, z.B. ob davor irgendwelche Abfragen sind.
hunter=CreatePickup(1239,14,1284.6592,2533.6265,110.6824,-1);
Mein ganzer Mode
public OnGameModeInit()
{
ConnectNPC("DC","DC");
DC=CreateVehicle(519,1294.1848,-3600.6604,22.3384,92.1220,1,1,-1); // DC
AddStaticVehicle(519,1294.1848,-3600.6604,22.3384,92.1220,1,1); // DC
//Timer
SetTimer("Save",1,1);
SetTimer("streak",1000,1);
SetTimer("Death",1000,1);
//pick
//Drift
CreateObject(8390,-1437.50000000,2827.69995117,117.09999847,0.00000000,0.00000000,100.00000000); //object(multicarpark01_lvs) (1)
CreateObject(16430,-1358.80004883,2838.30004883,100.40000153,0.00000000,341.99996948,8.00000000); //object(des_ebrigroad02) (1)
CreateObject(16430,-1204.90002441,2859.80004883,125.09999847,0.00000000,0.00000000,8.00000000); //object(des_ebrigroad02) (2)
CreateObject(978,-1372.90002441,2803.60009766,130.60000610,0.00000000,0.00000000,100.00000000); //object(sub_roadright) (1)
CreateObject(978,-1368.90002441,2809.69995117,130.60000610,0.00000000,0.00000000,10.00000000); //object(sub_roadright) (2)
CreateObject(4866,-1057.80004883,2817.89990234,114.00000000,0.00000000,179.99450684,275.99853516); //object(lasrnway1_las) (1)
CreateObject(4866,-1001.50000000,2877.50000000,79.19999695,0.00000000,91.99996948,8.00000000); //object(lasrnway1_las) (2)
CreateObject(4866,-1053.00000000,2534.10009766,86.50000000,0.00000000,188.00000000,267.99987793); //object(lasrnway1_las) (3)
CreateObject(4866,-1014.90002441,2387.80004883,94.80000305,0.00000000,267.99499512,87.99499512); //object(lasrnway1_las) (4)
CreateObject(987,-1107.19995117,2342.30004883,85.40000153,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (1)
CreateObject(987,-1096.09997559,2342.50000000,85.09999847,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (2)
CreateObject(4866,-1051.80004883,2351.89990234,84.50000000,0.00000000,274.00000000,107.99996948); //object(lasrnway1_las) (6)
CreateObject(987,-1086.40002441,2342.30004883,84.69999695,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (3)
CreateObject(987,-1243.30004883,2662.50000000,48.00000000,0.00000000,0.00000000,20.00000000); //object(elecfence_bar) (4)
CreateObject(987,-1234.59997559,2665.80004883,46.00000000,0.00000000,0.00000000,22.00000000); //object(elecfence_bar) (5)
CreateObject(987,-1224.19995117,2669.80004883,45.29999924,0.00000000,0.00000000,18.00000000); //object(elecfence_bar) (6)
CreateObject(987,-1212.90002441,2673.39990234,46.09999847,0.00000000,0.00000000,18.00000000); //object(elecfence_bar) (7)
CreateObject(987,-1203.19995117,2677.00000000,44.50000000,0.00000000,356.00000000,26.00000000); //object(elecfence_bar) (8)
CreateObject(8838,-1291.87988281,2503.71191406,87.82791901,7.19604492,0.00000000,0.00000000); //object(vgehshade01_lvs) (2)
CreateObject(8838,-1291.90002441,2498.50000000,87.50000000,0.00000000,0.00000000,0.00000000); //object(vgehshade01_lvs) (6)
CreateObject(8838,-1291.09997559,2503.71215820,87.82791901,7.19999981,0.00000000,0.00000000); //object(vgehshade01_lvs) (7)
CreateObject(8838,-1290.30004883,2508.84204102,88.80649567,14.39999962,0.00000000,0.00000000); //object(vgehshade01_lvs) (8)
CreateObject(8838,-1289.50000000,2513.80883789,90.42030334,21.59999847,0.00000000,0.00000000); //object(vgehshade01_lvs) (9)
CreateObject(8838,-1288.70007324,2518.53417969,92.64389801,28.79999924,0.00000000,0.00000000); //object(vgehshade01_lvs) (10)
CreateObject(8838,-1287.90002441,2522.94360352,95.44219971,36.00000000,0.00000000,0.00000000); //object(vgehshade01_lvs) (11)
CreateObject(8838,-1287.09997559,2526.96752930,98.77108765,43.20000076,0.00000000,0.00000000); //object(vgehshade01_lvs) (12)
CreateObject(8838,-1286.30004883,2530.54248047,102.57804871,50.40000153,0.00000000,0.00000000); //object(vgehshade01_lvs) (13)
CreateObject(8838,-1285.50000000,2533.61206055,106.80305481,57.60000229,0.00000000,0.00000000); //object(vgehshade01_lvs) (14)
CreateObject(8838,-1284.70007324,2536.12792969,111.37948608,64.80000305,0.00000000,0.00000000); //object(vgehshade01_lvs) (15)
CreateObject(8838,-1283.90002441,2538.05053711,116.23515320,72.00000000,0.00000000,0.00000000); //object(vgehshade01_lvs) (16)
CreateObject(8838,-1283.09997559,2539.34936523,121.29347229,79.19999695,0.00000000,0.00000000); //object(vgehshade01_lvs) (17)
CreateObject(8838,-1291.90002441,2493.50000000,87.50000000,0.00000000,0.00000000,0.00000000); //object(vgehshade01_lvs) (58)
CreateObject(978,-1387.59997559,2831.10009766,124.19999695,0.00000000,0.00000000,280.00000000); //object(sub_roadright) (3)
CreateObject(978,-1389.40002441,2840.69995117,124.19999695,0.00000000,0.00000000,280.00000000); //object(sub_roadright) (4)
CreateObject(978,-1486.00000000,2814.50000000,117.80000305,0.00000000,0.00000000,100.00000000); //object(sub_roadright) (5)
CreateObject(978,-1487.50000000,2823.80004883,117.80000305,0.00000000,0.00000000,100.00000000); //object(sub_roadright) (6)
CreateObject(978,-1388.00000000,2831.10009766,111.40000153,0.00000000,0.00000000,280.00000000); //object(sub_roadright) (7)
CreateObject(978,-1389.40002441,2840.10009766,111.40000153,0.00000000,0.00000000,278.00000000); //object(sub_roadright) (8)
CreateObject(978,-1487.50000000,2824.39990234,105.00000000,0.00000000,0.00000000,98.00000000); //object(sub_roadright) (9)
CreateObject(978,-1486.09997559,2815.00000000,105.00000000,0.00000000,0.00000000,98.00000000); //object(sub_roadright) (10)
CreateObject(978,-1391.30004883,2832.30004883,98.59999847,0.00000000,0.00000000,280.00000000); //object(sub_roadright) (11)
CreateObject(978,-1381.40002441,2843.39990234,98.59999847,0.00000000,0.00000000,188.00000000); //object(sub_roadright) (12)
CreateObject(978,-1389.09997559,2839.50000000,98.59999847,0.00000000,0.00000000,226.00000000); //object(sub_roadright) (13)
CreateObject(3749,-1351.30004883,2369.39990234,100.69999695,0.00000000,0.00000000,354.00000000); //object(clubgate01_lax) (1)
CreateObject(3458,-1295.50000000,2465.50000000,88.50000000,0.00000000,8.00000000,270.00000000); //object(vgncarshade1) (1)
CreateObject(3458,-1292.00000000,2466.00000000,88.40000153,0.00000000,8.00000000,268.00000000); //object(vgncarshade1) (2)
hunter=CreatePickup(1239,14,1284.6592,2533.6265,110.6824,0);
//
SetGameModeText("Dawn");
AddPlayerClass(47, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 999, 31, 999, 0, 0);
AddPlayerClass(2, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 999, 31, 999, 0, 0);
ShowPlayerMarkers(0);
for(new i = 0; i < MAX_PLAYERS; i++)
{
FPS = TextDrawCreate(8.000000, 428.000000, "FPS: 30");
TextDrawBackgroundColor(FPS, 255);
TextDrawFont(FPS, 3);
TextDrawLetterSize(FPS, 0.480000, 2.000000);
TextDrawColor(FPS, -65281);
TextDrawSetOutline(FPS, 1);
TextDrawSetProportional(FPS, 1);
}
SetTimer("FPSUP",1203,true);
return 1;
}[i][i][/i][/i]
Füg einfach bei OnGameModeInit ein :
CreatePickup(playerid,[PickupID],1,x.y.z Pos);
dir ist schon klar Typ 14 = wenn man mit einem Fahrzeug in das Pickup geht wird der Code ausgeführt.
Wird 'hunter' global deklariert?
@Showtek
Ja ist global
@apo
Ja das soll ja nur im car passieren!
hunter=CreatePickup(1239,14,-1284.6592,2533.6265,110.6824,0);
Das Pickup ist gekommen, jedoch an den falschen Koordinaten, da du das Minus vergessen hast.