Hallo,
dieses FS hat das problem, das wenn ich irgendeinen Befehl eingebe (/kill usw.) da steht, du bist in keinem Security Van
#include <a_samp>
#include <a_vehicles>
new Checkpoint[MAX_PLAYERS];
new mission[MAX_PLAYERS];
#define COLOR_LIGHTGREEN 0x86FF59FF
#define COLOR_RED 0xFF0000FF
#define COLOR_GREEN 0x00CA00FF
forward missionfailed(playerid);
public OnFilterScriptInit()
{
//Message in server window
print(" |________________________________|");
print(" |____FilterScript Security ____|");
print(" |____Scripted by Alexanda________|");
print(" |____Edited by zombiemodder________|");
AddStaticVehicle(428,1781.4945,-1164.4995,23.9553,75.3629,4,75); // car
AddStaticVehicle(428,1798.7031,-1168.9934,23.9514,75.3664,4,75); // car1
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnGameModeExit() {
return 1;
}
public OnPlayerRequestClass(playerid, classid) {
return 1;
}
public OnPlayerRequestSpawn(playerid) {
return 1;
}
public OnPlayerConnect(playerid) {
return 1;
}
public OnPlayerDisconnect(playerid, reason) {
return 1;
}
public OnPlayerSpawn(playerid) {
return 1;
}
public OnPlayerDeath(playerid, killerid, reason) {
return 1;
}
public OnVehicleSpawn(vehicleid) {
return 1;
}
public OnVehicleDeath(vehicleid, killerid) {
return 1;
}
public OnPlayerText(playerid, text[]) {
return 1;
}
public OnPlayerPrivmsg(playerid, recieverid, text[]) {
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[]) {
new cmd[256];
new vehicleid = GetPlayerVehicleID(playerid);
new model = GetVehicleModel(vehicleid);
if (strcmp("/start", cmd, true, 5) == 0) {
if(mission[playerid] == 0)
{
if(model == 428)
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "Waffenliefern gestartet, fahre nun zu den Waffenlaeden!");
SetPlayerCheckpoint(playerid, 1362.5675,-1286.7466,13.3828, 5.0);
Checkpoint[playerid] = 1;
mission[playerid] =1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist nicht im Security Van!");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Es laeuft schon eine Mission!");
}
return 1;
}
if (strcmp("/deponie", cmd, true, 5) ==0)
{
if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid, 1792.0813,-1168.1105,23.8281);
return 1;
}
}
return 0;
}
public OnPlayerInfoChange(playerid) {
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) {
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) {
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid) {
new model = GetVehicleModel(vehicleid);
if(model == 428)
{
if (mission[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "* Du hast 15 Sekunden um zurueck in den Van zu steigen !");
SetTimerEx("missionfailed", 15000, 0,"i",playerid);
}
return 1;
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate) {
return 1;
}
public OnPlayerEnterCheckpoint(playerid) {
new trinkgeld = random(5000);
new string[256];
if(Checkpoint[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "Waffen abgeladen, weiter!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, COLOR_GREEN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 1190.0376,-1516.2498,13.6714, 5.0);
Checkpoint[playerid] = 2;
}
else if(Checkpoint[playerid] == 2)
{
SendClientMessage(playerid, COLOR_RED, "Waffen abgeladen, weiter!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, COLOR_GREEN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 995.1347,-1298.1212,13.5858, 5.0);
Checkpoint[playerid] = 3;
}
else if(Checkpoint[playerid] == 3)
{
SendClientMessage(playerid, COLOR_RED, "Waffen abgeladen, weiter!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, COLOR_GREEN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 923.7735,-1221.0549,17.1002, 5.0);
Checkpoint[playerid] = 4;
}
else if(Checkpoint[playerid] == 4)
{
SendClientMessage(playerid, COLOR_RED, "Waffen abgeladen, weiter!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, COLOR_GREEN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 667.0082,-1276.9081,13.5849, 5.0);
Checkpoint[playerid] = 5;
}
else if(Checkpoint[playerid] == 5)
{
SendClientMessage(playerid, COLOR_RED, "Waffen abgeladen, weiter!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, COLOR_GREEN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 521.7947,-1605.4280,16.3613, 5.0);
Checkpoint[playerid] = 6;
}
else if(Checkpoint[playerid] == 6)
{
SendClientMessage(playerid, COLOR_RED, "Waffen abgeladen, weiter!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, COLOR_GREEN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 810.8107,-1633.8809,13.5052, 5.0);
Checkpoint[playerid] = 7;
}
else if(Checkpoint[playerid] == 7)
{
SendClientMessage(playerid, COLOR_RED, "Waffen abgeladen, weiter!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, COLOR_GREEN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 1158.0615,-1857.8085,13.5847, 5.0);
Checkpoint[playerid] = 8;
}
else if(Checkpoint[playerid] == 8)
{
SendClientMessage(playerid, COLOR_RED, "Waffen abgeladen, weiter!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, COLOR_GREEN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 1408.9534,-1878.3280,13.6733, 5.0);
Checkpoint[playerid] = 9;
}
else if(Checkpoint[playerid] == 9)
{
SendClientMessage(playerid, COLOR_RED, "Waffen abgeladen, weiter!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, COLOR_GREEN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 1844.1622,-1870.2968,13.5095, 5.0);
Checkpoint[playerid] = 10;
}
else if(Checkpoint[playerid] == 10)
{
SendClientMessage(playerid, COLOR_RED, "Das war der letzte fahre nun zurück!");
GivePlayerMoney(playerid, trinkgeld);
format(string, sizeof(string), "** Du hast %d$ Trinkgeld bekommen!",trinkgeld);
SendClientMessage(playerid, COLOR_GREEN, string);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 1792.0813,-1168.1105,23.8281, 5.0);
Checkpoint[playerid] = 11;
}
else if(Checkpoint[playerid] == 11)
{
SendClientMessage(playerid, COLOR_RED, "Herzlichen Glueckwunsch, und danke das du hilfst die Stadt bewaffnet zu halten!");
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid, 20000);
SendClientMessage(playerid, COLOR_RED, "Du bekommst einen Bonus von 20.000$");
mission[playerid] = 0;
}
return 1;
}
public OnPlayerLeaveCheckpoint(playerid) {
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid) {
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid) {
return 1;
}
public OnRconCommand(cmd[]) {
return 1;
}
public OnObjectMoved(objectid) {
return 1;
}
public OnPlayerObjectMoved(playerid, objectid) {
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid) {
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row) {
return 1;
}
public OnPlayerExitedMenu(playerid) {
return 1;
}
public missionfailed(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
new model = GetVehicleModel(vehicleid);
if(model == 408)
{ }
else
{
SendClientMessage(playerid, COLOR_RED, "Waffenmission gescheitert!");
DisablePlayerCheckpoint(playerid);
mission[playerid] = 0;
}
return 1;
}
(c)AlexandA
und noch eine Frage:
wie mache ich das wenn ich /ausliefern eingebe erst der nächste Checkpoint kommt?3
Danke