so habe es jetze zur probe 2 Kleine Strecken gemacht
wie muss ich es jetze beim Starten machen und weiter bei OnPlayerEnterCheckPoint mit SetPlayerCheckPoint.....
sry habe noch nie Mit mehrdimensionalen Arrays gearbeitet
new Postfuhr_Stationen[][][e_Post] =
{
{
{2200.8418,-2302.9058,14.7647,5.0},
{2084.4307,-1655.3788,12.9596,5.0},
{2069.5339,-1654.8695,13.5469,5.0},
{1911.9973,-1609.7638,13.3828,5.0},
{1911.5476,-1603.8575,13.5469,5.0},
{1785.9860,-1607.3059,13.3646,5.0},
{1800.0997,-1583.5662,13.4807,5.0}
},
{
{2200.8418,-2302.9058,14.7647,5.0},
{1802.4884,-2110.4175,13.3828,5.0},
{1801.9083,-2101.2861,13.5469,5.0},
{1781.7310,-2110.1184,13.3828,5.0},
{1781.4517,-2103.3643,13.5469,5.0},
{1760.9467,-2110.3735,13.3828,5.0},
{1762.4025,-2103.9119,13.5469,5.0}
}
};
ocmd:starten(playerid)
{
if(sInfo[playerid][pjob] == 4)
{
for(new i = 0; i < sizeof(postCars); i++)
{
if(Postinfo[playerid][post_bAktiv] == true)
{
SendClientMessage(playerid,ROT,"Du bist schon im Post Dienst!");
}
else
{
Postinfo[playerid][post_Checkpoint]=0;
Postinfo[playerid][post_bAktiv]=true;
new veh = GetPlayerVehicleID(playerid);
ppost[playerid] = veh;
SetPlayerCheckpoint(playerid,Postfuhr_Stationen[0][P_fx],Postfuhr_Stationen[0][P_fy],Postfuhr_Stationen[0][P_fz],Postfuhr_Stationen[0][P_fRad]);// Hier bekomme ich error 035: argument type mismatch (argument 2)
return 1;
}
}
}
else
{
SendClientMessage(playerid,ROT,"Du bist kein Postbote!");
return 1;
}
return 1;
}
if(Postinfo[playerid][post_bAktiv])
{
if(Postinfo[playerid][post_Checkpoint] == 0)
{
for(new i = 0; i < sizeof(postCars); i++)
{
if(IsPlayerInVehicle(playerid,postCars[i]))
{
Postinfo[playerid][post_Checkpoint]++;
Postinfo[playerid][postcp] = 1;
DisablePlayerCheckpoint(playerid);
new rand = random(sizeof(RandomSpawn1));
SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
SendClientMessage(playerid,weiß,"Bitte lagere jetze 10 Packete in dein Postwagen, welche du anschließend ausliefern musst!");
return 1;
}
}
}
else
{
if(Postinfo[playerid][postcp] == 1)
{
for(new f = 0; f < sizeof(postg); f++)
{
if(IsPlayerInVehicle(playerid,postg[f]))
{
new Float:vx,Float:vy,Float:vz;
DisablePlayerCheckpoint(playerid);
postpacket[GetPlayerVehicleID(playerid)] = CreateObject(1558,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(postpacket[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.000000,0.599999,0.449999,-0.000001,0.000000,-91.799980);
GetPosHinterFahrzeug(ppost[playerid],7,Float:vx,Float:vy,Float:vz);
SendClientMessage(playerid,ROT,"Aufgeladen!");
Postinfo[playerid][postcp] = 2;
SetPlayerCheckpoint(playerid,vx,vy,vz,3.0);
return 1;
}
}
}
else if(Postinfo[playerid][postcp] == 2)
{
Postinfo[playerid][postpackete] ++;
new string[128];
format(string,sizeof(string),"%d/10 Packete eingelagert!",Postinfo[playerid][postpackete]);
SendClientMessage(playerid,weiß,string);
DisablePlayerCheckpoint(playerid);
DestroyObject(postpacket[GetPlayerVehicleID(playerid)]);
SendClientMessage(playerid,ROT,"Packet eingelagert");
if(Postinfo[playerid][postpackete] < 2)
{
Postinfo[playerid][postcp] = 1;
new rand = random(sizeof(RandomSpawn1));
SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
return 1;
}
else
{
Postinfo[playerid][postcp] = 3;
new veh = GetPlayerVehicleID(playerid);
SetVehicleToRespawn(veh);
tank[veh] = 100;
SendClientMessage(playerid,GELB,"Du hast die Packet erfolgreich eingeladen Trage sie nun aus!");
DestroyObject(postpacket[GetPlayerVehicleID(playerid)]);
new id = Postinfo[playerid][post_Checkpoint];
SetPlayerCheckpoint(playerid,Postfuhr_Stationen[id][P_fx],Postfuhr_Stationen[id][P_fy],Postfuhr_Stationen[id][P_fz],Postfuhr_Stationen[id][P_fRad]);
return 1;
}
}
else if(Postinfo[playerid][postcp] == 3)
{
for(new i = 0; i < sizeof(postCars); i++)
{
if(IsPlayerInVehicle(playerid,postCars[i]))
{
new Float:vx,Float:vy,Float:vz;
GetPosHinterFahrzeug(ppost[playerid],7,Float:vx,Float:vy,Float:vz);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,vx,vy,vz,3.0);
Postinfo[playerid][postcp] = 5;
return 1;
}
}
}
else if(Postinfo[playerid][postcp] == 4)
{
if(!IsPlayerInAnyVehicle(playerid))
{
Postinfo[playerid][postpackete] --;
new string[128];
format(string,sizeof(string),"Packet abgeliefert,%d/10 Packete übrig!",Postinfo[playerid][postpackete]);
SendClientMessage(playerid,weiß,string);
ClearAnimations(playerid);
Postinfo[playerid][post_Checkpoint] ++;
DisablePlayerCheckpoint(playerid);
new id = Postinfo[playerid][post_Checkpoint];
SetPlayerCheckpoint(playerid,Postfuhr_Stationen[id][P_fx],Postfuhr_Stationen[id][P_fy],Postfuhr_Stationen[id][P_fz],Postfuhr_Stationen[id][P_fRad]);
Postinfo[playerid][postcp] = 3;
return 1;
}
}
else if(Postinfo[playerid][postcp] == 5)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_CARRY);
Postinfo[playerid][post_Checkpoint] ++;
DisablePlayerCheckpoint(playerid);
new id = Postinfo[playerid][post_Checkpoint];
SetPlayerCheckpoint(playerid,Postfuhr_Stationen[id][P_fx],Postfuhr_Stationen[id][P_fy],Postfuhr_Stationen[id][P_fz],Postfuhr_Stationen[id][P_fRad]);
Postinfo[playerid][postcp] = 4;
return 1;
}
}
}
}