Huhu,
da ich noch ein ziemlicher Neuling bin habe ich mir in Youtube angeschaut wie ich Fraktionscars den einzelnen Fraktionen zuweise. Dies habe ich vorerst einmal mit der Fraktion LSPD gemacht.
Als erstes habe ich das gemacht.
new lspdcar[25];
danach habe ich dann das gemacht..
lspdcar[0] = AddStaticVehicle(596,1468.5629,-1749.5864,5.7063,181.0237,0,1); // lspdcar[1] = AddStaticVehicle(596,1459.0190,-1749.4846,5.7046,181.0161,0,1); // lspdcar[2] = AddStaticVehicle(596,1450.7234,-1749.3811,5.7041,180.4256,0,1); // lspdcar[3] = AddStaticVehicle(596,1477.1545,-1749.6093,5.7062,180.9357,0,1); // lspdcar[4] = AddStaticVehicle(596,1485.8617,-1749.8708,5.7041,180.3282,0,1); // lspdcar[5] = AddStaticVehicle(596,1494.6633,-1749.5453,5.7033,178.9595,0,1); // lspdcar[6] = AddStaticVehicle(596,1503.3746,-1750.9152,5.7058,180.0022,0,1); // lspdcar[7] = AddStaticVehicle(560,1456.6620,-1770.7635,5.6886,90.8847,0,0); //lspdcar[8] = AddStaticVehicle(560,1456.5200,-1774.7476,5.6883,90.0891,0,0); // lspdcar[9] = AddStaticVehicle(560,1457.1464,-1779.0225,5.6889,90.3032,0,0); // lspdcar[10] = AddStaticVehicle(560,1457.5231,-1783.5103,5.6891,93.7812,0,0); // lspdcar[11] = AddStaticVehicle(599,1438.7281,-1774.7712,6.1709,269.9102,0,1); // lspdcar[12] = AddStaticVehicle(599,1439.5201,-1779.7489,6.1750,271.3457,0,1); // lspdcar[13] = AddStaticVehicle(599,1439.2843,-1784.4285,6.1682,269.9683,0,1); // lspdcar[14] = AddStaticVehicle(599,1439.3160,-1789.6332,6.1734,268.6500,0,1); // lspdcar[15] = AddStaticVehicle(601,1468.3568,-1793.5585,5.7424,178.3860,1,1); // lspdcar[16] = AddStaticVehicle(601,1490.4918,-1793.6210,5.7426,178.9890,1,1); // lspdcar[17] = AddStaticVehicle(523,1514.9614,-1762.3364,5.5549,89.1794,1,1); // lspdcar[18] = AddStaticVehicle(523,1514.6464,-1765.1086,5.5493,88.6304,1,1); // lspdcar[19] = AddStaticVehicle(523,1514.4427,-1768.3195,5.5526,90.3384,1,1); // lspdcar[20] = AddStaticVehicle(523,1514.1810,-1771.6117,5.5508,91.2252,1,1); // lspdcar[21] = AddStaticVehicle(523,1513.8224,-1775.3875,5.5546,86.1462,1,1); // lspdcar[22] = AddStaticVehicle(427,1479.1471,-1794.0081,6.1151,178.0673,0,1); // lspdcar[23] = AddStaticVehicle(497,1466.1024,-1790.6205,41.7501,359.9491,0,1); // lspdcar[24] = AddStaticVehicle(497,1414.9551,-1791.4514,41.7279,0.0840,0,1); //
und zu guter letzt..
{ if(newstate = PLAYER_STATE_DRIVER) { for(new i = 0;1<sizeof(lspdcar)i++)) { if(GetPlayerVehicleID(playerid) == lspdcar[i] { if(!IsPlayerInFrac(playerid,1); { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,COLOR_RED,"Nur Fraktionsmitgleider des Los Santos Police Departments dürfen diese Fahrzeuge fahren"); } } } } renturn 1; }
Wenn ich das ganze dann compile kommt folgendes:
C:\Users\Marc\Downloads\samp03x_svr_R1-2_win32\gamemodes\Script.pwn(10051) : warning 211: possibly unintended assignment
C:\Users\Marc\Downloads\samp03x_svr_R1-2_win32\gamemodes\Script.pwn(10053) : warning 206: redundant test: constant expression is non-zero
C:\Users\Marc\Downloads\samp03x_svr_R1-2_win32\gamemodes\Script.pwn(10053) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Marc\Downloads\samp03x_svr_R1-2_win32\gamemodes\Script.pwn(10053) : error 029: invalid expression, assumed zero
C:\Users\Marc\Downloads\samp03x_svr_R1-2_win32\gamemodes\Script.pwn(10055) : error 017: undefined symbol "i"
C:\Users\Marc\Downloads\samp03x_svr_R1-2_win32\gamemodes\Script.pwn(10057) : error 001: expected token: ")", but found ";"
C:\Users\Marc\Downloads\samp03x_svr_R1-2_win32\gamemodes\Script.pwn(10057) : error 036: empty statement
C:\Users\Marc\Downloads\samp03x_svr_R1-2_win32\gamemodes\Script.pwn(10065) : error 017: undefined symbol "renturn"
C:\Users\Marc\Downloads\samp03x_svr_R1-2_win32\gamemodes\Script.pwn(10065) : warning 215: expression has no effect
C:\Users\Marc\Downloads\samp03x_svr_R1-2_win32\gamemodes\Script.pwn(10313) : warning 202: number of arguments does not match definition
C:\Users\Marc\Downloads\samp03x_svr_R1-2_win32\gamemodes\Script.pwn(10313) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
Kann mir einer helfen bzw meine Fehler ausbessern? Ich weiß wirklich nicht weiter.
Noch einmal: Das ganze wurde durch ein Youtube Tutorial erstellt, da ich noch am lernen bin und bei mir gerade nicht weiß was ich falsch gemacht habe.
Mit freundlichen Grüßen
SoftCake