if(strcmp(cmdtext,"/sirene",true) == 0)
{
if(IsACop(playerid))
{
sfl1[GetPlayerVehicleID(playerid)] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl2[GetPlayerVehicleID(playerid)] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl3[GetPlayerVehicleID(playerid)] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl4[GetPlayerVehicleID(playerid)] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl5[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(sfl1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.365000,2.250000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.405000,2.250000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.270000,2.275000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl4[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.304999,2.275000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl5[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.589999,-0.069999,0.869999,0.000000,0.000000,0.000000);
}
else
{
SendClientMessage(playerid,0xFF0000FF,"Du bist kein Beamter" );
}
return 1;
}
Möchte das /sirene an jedem Auto geht!
- MysteriX
- Geschlossen
- Erledigt
-
-
Dann Check ob spieler im auto sitzt.
-
if(strcmp(cmdtext,"/sirene",true) == 0)
{
if(IsACop(playerid)) //diese abfrage raus und if(isplayerinanyvehicle(playerid)) einbauen, das fragt ab ob die person in einem auto sitzt, das kannste auch mit getplayerstate machen, dann kannste damit abfragen ob er beifahrer ist, richtiger fahrer und so weiter.{
sfl1[GetPlayerVehicleID(playerid)] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl2[GetPlayerVehicleID(playerid)] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl3[GetPlayerVehicleID(playerid)] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl4[GetPlayerVehicleID(playerid)] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl5[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(sfl1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.365000,2.250000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.405000,2.250000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.270000,2.275000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl4[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.304999,2.275000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl5[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.589999,-0.069999,0.869999,0.000000,0.000000,0.000000);
}
else
{
SendClientMessage(playerid,0xFF0000FF,"Du bist kein Beamter" );
}
return 1;
} -
if(strcmp(cmdtext,"/sirene",true) == 0)
{
if(IsACop(playerid)) //diese abfrage raus und if(isplayerinanyvehicle(playerid)) einbauen, das fragt ab ob die person in einem auto sitzt, das kannste auch mit getplayerstate machen, dann kannste damit abfragen ob er beifahrer ist, richtiger fahrer und so weiter.{
sfl1[GetPlayerVehicleID(playerid)] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl2[GetPlayerVehicleID(playerid)] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl3[GetPlayerVehicleID(playerid)] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl4[GetPlayerVehicleID(playerid)] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl5[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(sfl1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.365000,2.250000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.405000,2.250000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.270000,2.275000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl4[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.304999,2.275000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl5[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.589999,-0.069999,0.869999,0.000000,0.000000,0.000000);
}
else
{
SendClientMessage(playerid,0xFF0000FF,"Du bist kein Beamter" );
}
return 1;
}Will ja aber auch haben das es nur Cops machen können!
-
Dann machst du es halt so. if(IsACop(playerid) && IsPlayerInAnyVehicle(playerid))
-
breadfish.de
Hat das Thema geschlossen.