Hallo.
Unser Scripter hat wiedermal "technische Probleme".
Er wollte einen "/news"-Befehl machen.
Dies soll aber nur in den dafür vorbestimmten News-Fahrzeugen funktionieren.
Hier mal der Befehl:
CMD:news(playerid, params[])
{
new text[96], string[128];
new vID = GetPlayerVehicleID(playerid);
if(!(Spieler[playerid][pFraktion] == 6))return SendClientMessage(playerid, COLOR_GREY, "** Du bist kein San Andreas News Agentur Mitglied.");
if(sscanf(params, "s[96]", text))return SendClientMessage(playerid, COLOR_GREY, "** Benutze /news [Nachricht]");
format(string, sizeof(string), "NR %s: %s", GetName(playerid), text);
if(IsNewsVehicle(vID))
{
SendClientMessageToAll(COLOR_ORANGE, string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "** Du befindest dich in keinem News-Fahrzeug.");
}
return 1;
}
Das doofe ist jetzt, er kann überall wo er will den Befehl ausführen. Außerhalb der News Fahrzeuge und darin.
IsNewsVehicle & Vehicle-Creation
stock IsNewsVehicle(vehicleid)
{
for(new i=0;i<sizeof(vehicle_News);i++)
{
if(vehicleid == vehicle_News[i])return 1;
}
return 0;
}
new
vehicle_News[11];
// Funktion: LoadVehicles (lädt bei OnGameModeInit, Fahrzeuge sind auch da)
vehicle_News[0] = AddStaticVehicleEx(582,1590.5923,-1345.8492,16.5347,359.5183,6,6, -1); // News1
vehicle_News[1] = AddStaticVehicleEx(582,1590.7854,-1338.2826,16.5376,358.7216,6,6, -1); // News2
vehicle_News[2] = AddStaticVehicleEx(586,1580.6110,-1343.1049,16.0034,268.7104,6,6, -1); // News3
vehicle_News[3] = AddStaticVehicleEx(586,1580.4904,-1344.9580,16.0031,267.6577,6,6, -1); // News4
vehicle_News[4] = AddStaticVehicleEx(586,1580.4385,-1346.9618,16.0030,270.7371,6,6, -1); // News5
vehicle_News[5] = AddStaticVehicleEx(586,1580.3724,-1349.0510,15.9959,272.9656,6,6, -1); // News6
vehicle_News[6] = AddStaticVehicleEx(586,1580.2241,-1350.9464,16.0033,269.4151,6,6, -1); // News7
vehicle_News[7] = AddStaticVehicleEx(582,1572.5078,-1315.6311,16.5391,89.9458,6,6, -1); // News8
vehicle_News[8] = AddStaticVehicleEx(582,1565.8405,-1315.6493,16.5398,90.1398,6,6, -1); // News9
vehicle_News[9] = AddStaticVehicleEx(582,1558.0563,-1315.7284,16.5417,90.5214,6,6, -1); // News10
vehicle_News[0] = AddStaticVehicleEx(582,1590.5923,-1345.8492,16.5347,359.5183,6,6, -1); // News1
vehicle_News[1] = AddStaticVehicleEx(582,1590.7854,-1338.2826,16.5376,358.7216,6,6, -1); // News2
vehicle_News[2] = AddStaticVehicleEx(586,1580.6110,-1343.1049,16.0034,268.7104,6,6, -1); // News3
vehicle_News[3] = AddStaticVehicleEx(586,1580.4904,-1344.9580,16.0031,267.6577,6,6, -1); // News4
vehicle_News[4] = AddStaticVehicleEx(586,1580.4385,-1346.9618,16.0030,270.7371,6,6, -1); // News5
vehicle_News[5] = AddStaticVehicleEx(586,1580.3724,-1349.0510,15.9959,272.9656,6,6, -1); // News6
vehicle_News[6] = AddStaticVehicleEx(586,1580.2241,-1350.9464,16.0033,269.4151,6,6, -1); // News7
vehicle_News[7] = AddStaticVehicleEx(582,1572.5078,-1315.6311,16.5391,89.9458,6,6, -1); // News8
vehicle_News[8] = AddStaticVehicleEx(582,1565.8405,-1315.6493,16.5398,90.1398,6,6, -1); // News9
vehicle_News[9] = AddStaticVehicleEx(582,1558.0563,-1315.7284,16.5417,90.5214,6,6, -1); // News10
Kann ihn jemand helfen?