Hallo brotfische
ich kann zwar nicht so gut scripten aber das müsstet ihr mich noch erläutern wie das in dem fall geht
#include <a_samp>
#define COLOR_LIGHTGREEN 0x86FF59FF
#define COLOR_RED 0xFF0000FF
#define COLOR_GREEN 0x00CA00FF
//---------------------------------------PIZZA-----------------------------------
#define LOHN_PIZZA 560
#define mod_pizza 448
#define respawnzeit_pizza 10000
//---------------------------------------MÜLLL_----------------------------------
#define LOHN_MÜLL 2600
#define standtzeit_muell 10000
#define mod_müll 408
#define respawnzeit_müll 10000
//-------------------------------------------------------------------------------
//************************************pizza**************************************
enum e_PlayerpizzaInfo {
bool:pmi_bAktiv,
pmi_Checkpoint
}
new pizzamann[MAX_PLAYERS][e_PlayerpizzaInfo];
enum e_pizza {
Float:M_fX,
Float:M_fY,
Float:M_fZ,
Float:M_fRad
}
new
pizza_Stationen[][e_pizza] = {
{-3610.9536,797.5580,11.8063, 6.0},
{-3641.2034,1115.3104,11.7977, 6.0}, // CP feuerwehr
{-3613.1448,1051.2479,11.6066, 6.0}, // CP club
{-3213.9734,1613.3110,13.0741, 6.0}, // CP HAUS
{-3226.9355,1601.4688,13.3220, 6.0}, // CP HAUS
{-3290.1077,1597.7753,13.4782, 6.0}, // CP HAUS
{-3369.0374,1598.2791,14.5704, 6.0}, // CP HAUS
{-3551.0222,1593.7068,13.0991, 6.0}, // CP HAUS
{-3592.2454,1730.4998,13.0904, 6.0},// CP HAUS
{-3563.6946,1765.6960,13.2227, 6.0},// CP HAUS
{-3699.8652,1780.1865,13.49862, 6.0}, // CP HAUS
{-3587.1316,958.0477,11.8916, 6.0}, // CP HAUS
{-3620.4663,796.6235,11.8913, 6.0} // CP HAUS
};
//*****************************************müll**********************************
forward muelltonne();
enum e_PlayerMuellInfo {
bool:pmi_bAktiv,
pmi_Checkpoint
}
new Muellmann[MAX_PLAYERS][e_PlayerMuellInfo];
enum e_Muell {
Float:M_fX,
Float:M_fY,
Float:M_fZ,
Float:M_fRad
}
new
Muellabfuhr_Stationen[][e_Muell] = {
{-74.2252, -1128.7936, 1.6359, 6.0},
{-89.2432, -1189.7782, 2.3241, 6.0},
{-63.3734, -1588.5732, 3.1782, 6.0},
{220.8943, -1393.5308, 52.1264, 6.0},
{169.0361, -1356.8065, 69.8208, 6.0},
{263.5524, -1341.0842, 53.7643, 6.0},
{871.9646, -864.5255, 77.2742, 6.0},
{935.7687, -835.7352, 94.4455, 6.0},
{1496.5879, -698.0237, 94.5207, 6.0},
{1001.1724, -935.0218, 41.9509, 6.0},
{-546.9002, -488.6077, 25.2961, 6.0}
};
////////////////////////////////////////////////////////////////////////////////
public OnFilterScriptInit()
{
print("Jobs Geladen");
CreateVehicle(mod_pizza,-3607.8113,815.3075,11.8018,89.3433,1,1,respawnzeit_pizza);
CreateVehicle(mod_müll,-3420.5662,1974.8643,24.4915,179.3183,65,55,respawnzeit_müll);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[]) {
if (strcmp("/jobpizza", cmdtext, true, 8) == 0) {
if(!pizzamann[playerid][pmi_bAktiv]) {
new
vehicleid = GetPlayerVehicleID(playerid),
model = GetVehicleModel(vehicleid);
if(model == mod_pizza) {
pizzamann[playerid][pmi_Checkpoint]=0;
pizzamann[playerid][pmi_bAktiv]=true;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "Pizza gestartet, fahre nun zu den einzelnen Haeusern!");
SetPlayerCheckpoint(playerid,pizza_Stationen[0][M_fX],pizza_Stationen[0][M_fY],pizza_Stationen[0][M_fZ],pizza_Stationen[0][M_fRad]);
SendClientMessage(playerid, COLOR_LIGHTGREEN, "");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "");
}
else {
SendClientMessage(playerid, COLOR_RED, "Du bist nicht im PIZZA-BOY!");
}
}
else {
SendClientMessage(playerid, COLOR_RED, "Es laeuft schon eine Mission!");
}
return 1;
}
if (strcmp("/müllstarten", cmdtext, true, 8) == 0) {
if(!Muellmann[playerid][pmi_bAktiv]) {
new
vehicleid = GetPlayerVehicleID(playerid),
model = GetVehicleModel(vehicleid);
if(model == 408) {
Muellmann[playerid][pmi_Checkpoint]=0;
Muellmann[playerid][pmi_bAktiv]=true;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "Muellabfuhr gestartet, fahre nun zu den einzelnen Haeusern!");
SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[0][M_fX],Muellabfuhr_Stationen[0][M_fY],Muellabfuhr_Stationen[0][M_fZ],Muellabfuhr_Stationen[0][M_fRad]);
}
else {
SendClientMessage(playerid, COLOR_RED, "Du bist nicht im Muellwagen!");
}
}
else {
SendClientMessage(playerid, COLOR_RED, "Es laeuft schon eine Mission!");
}
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid) {
if(pizzamann[playerid][pmi_bAktiv]) {
pizzamann[playerid][pmi_Checkpoint]++;
DisablePlayerCheckpoint(playerid);
new playercp = pizzamann[playerid][pmi_Checkpoint];
new String [256];
if(playercp == sizeof(pizza_Stationen)) {
pizzamann[playerid][pmi_bAktiv]=false;
SendClientMessage(playerid, COLOR_GREEN, "Super Arbeit,du hast dien Job gut gemeistert");
GivePlayerMoney(playerid,LOHN_PIZZA);
format(String,sizeof(String),"Danke! Dein Lohn beträgt %d$",LOHN_PIZZA);
SendClientMessage(playerid,COLOR_LIGHTGREEN,String);
}
else {
PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
format(String,sizeof(String),"Weiter so,du hast es fasst geschafft ! (%d / %d)",playercp,sizeof(pizza_Stationen));
SendClientMessage(playerid,COLOR_LIGHTGREEN,String);
SetPlayerCheckpoint(playerid,pizza_Stationen[playercp][M_fX],pizza_Stationen[playercp][M_fY],pizza_Stationen[playercp][M_fZ],pizza_Stationen[playercp][M_fRad]);
}
return 1;
}
if(Muellmann[playerid][pmi_bAktiv]) {
Muellmann[playerid][pmi_Checkpoint]++;
SetTimer("muelltonne",standtzeit_muell,false);
new playercp = Muellmann[playerid][pmi_Checkpoint];
new String [256];
if(playercp == sizeof(Muellabfuhr_Stationen)) {
Muellmann[playerid][pmi_bAktiv]=false;
SendClientMessage(playerid, COLOR_GREEN, "Super Arbeit,du hast dien Job gut gemeistert");
GivePlayerMoney(playerid,LOHN_MÜLL);
format(String,sizeof(String),"Danke! Dein Lohn beträgt %d$",LOHN_MÜLL);
SendClientMessage(playerid,COLOR_LIGHTGREEN,String);
}
else {
PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
format(String,sizeof(String),"Weiter so,du hast es fasst geschafft ! (%d / %d)",playercp,sizeof(pizza_Stationen));
SendClientMessage(playerid,COLOR_LIGHTGREEN,String);
SetPlayerCheckpoint(playerid,Muellabfuhr_Stationen[playercp][M_fX],Muellabfuhr_Stationen[playercp][M_fY],Muellabfuhr_Stationen[playercp][M_fZ],Muellabfuhr_Stationen[playercp][M_fRad]);
}
return 1;
}
return 1;
}
public muelltonne()
{
DisablePlayerCheckpoint(was muss hier rein);//dass es für den müllmann weg geht
}
jetzt hätte ich gerne dass für den Müllmann der cp erst nach der zeit weggeht
Vielen Dank im Vorraus
Euer Killer
//edit: Hallo?