Hey,
wieso kann ich den /news Befehl nur in einem einzigen Car benutzen statt in alles NewsCar's?
Code:
ocmd:news(playerid,params[])
{
if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
if(IsPlayerInAnyVehicle(playerid))
{
for(new i=0; i<sizeof(NewsCar); i++)
{
if(GetPlayerVehicleID(playerid) == NewsCar[i])
{
new text[128],nr[128];
if(sscanf(params,"s",text)) return SendClientMessage(playerid,Grau,"[Benutze]: /news [Text]");
format(nr,sizeof(nr),"NR %s: %s",GetName(playerid),text);
SendClientMessageToAll(Orange,nr);
return 1;
}
Fehler(playerid,"Du bist in keinem News Fahrzeug!");
return 1;
}
}
Fehler(playerid,"Du bist in keinem News Fahrzeug!");
return 1;
}
Fehler(playerid,"Du bist kein News Reporter!");
return 1;
}
{
if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
if(IsPlayerInAnyVehicle(playerid))
{
for(new i=0; i<sizeof(NewsCar); i++)
{
if(GetPlayerVehicleID(playerid) == NewsCar[i])
{
new text[128],nr[128];
if(sscanf(params,"s",text)) return SendClientMessage(playerid,Grau,"[Benutze]: /news [Text]");
format(nr,sizeof(nr),"NR %s: %s",GetName(playerid),text);
SendClientMessageToAll(Orange,nr);
return 1;
}
Fehler(playerid,"Du bist in keinem News Fahrzeug!");
return 1;
}
}
Fehler(playerid,"Du bist in keinem News Fahrzeug!");
return 1;
}
Fehler(playerid,"Du bist kein News Reporter!");
return 1;
}
Vehicles:
//NEWS REPORTER
NewsCar[0]=AddStaticVehicle(582,-314.7514,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[1]=AddStaticVehicle(582,-317.8429,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[2]=AddStaticVehicle(582,-320.9344,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[3]=AddStaticVehicle(582,-324.0259,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[4]=AddStaticVehicle(582,-327.1174,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[5]=AddStaticVehicle(582,-330.2089,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[6]=AddStaticVehicle(582,-333.3004,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[7]=AddStaticVehicle(582,-336.3919,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[8]=AddStaticVehicle(582,-339.4834,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[9]=AddStaticVehicle(582,-342.5749,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[10]=AddStaticVehicle(582,-345.6664,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[11]=AddStaticVehicle(488,-309.9134,1569.4065,75.5367,275.5628,0,0); // Heli
NewsCar[12]=AddStaticVehicle(488,-302.1933,1561.5715,75.5366,277.8422,0,0); // Heli
NewsCar[13]=AddStaticVehicle(488,-294.7991,1552.8628,75.5390,272.5410,0,0); // Heli
NewsCar[0]=AddStaticVehicle(582,-314.7514,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[1]=AddStaticVehicle(582,-317.8429,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[2]=AddStaticVehicle(582,-320.9344,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[3]=AddStaticVehicle(582,-324.0259,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[4]=AddStaticVehicle(582,-327.1174,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[5]=AddStaticVehicle(582,-330.2089,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[6]=AddStaticVehicle(582,-333.3004,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[7]=AddStaticVehicle(582,-336.3919,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[8]=AddStaticVehicle(582,-339.4834,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[9]=AddStaticVehicle(582,-342.5749,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[10]=AddStaticVehicle(582,-345.6664,1515.3643,75.4135,0.0,0,0); // newsVan
NewsCar[11]=AddStaticVehicle(488,-309.9134,1569.4065,75.5367,275.5628,0,0); // Heli
NewsCar[12]=AddStaticVehicle(488,-302.1933,1561.5715,75.5366,277.8422,0,0); // Heli
NewsCar[13]=AddStaticVehicle(488,-294.7991,1552.8628,75.5390,272.5410,0,0); // Heli