Guten Abend,
Ich habe nun einen Sirenen Befehl. Wenn Ich das so habe, und /sirene eingebe, dann kommt im Chat: SERVER: Unknow Command
dcmd_sirene(playerid,params[])
{
#pragma unused params
new test5[MAX_PLAYERS] = 0,vehicleid = GetPlayerVehicleID(playerid);
new test4[MAX_VEHICLES];
if(IstSpielerMember(playerid,2))
{
if(GetVehicleModel(vehicleid) == 490)
{
if(test5[playerid] == 0)
{
test4[vehicleid] = CreateObject(18646,10.0,10.0,10.0,0,0,0);
AttachObjectToVehicle(test4[vehicleid],vehicleid,0.0,0.75,0.275,0.0,0.1,0.0);
test5[playerid] = 1;
return 1;
}
if(test5[playerid] == 1)
{
DestroyObject(test4[vehicleid]);
test5[playerid] = 0;
return 1;
}
}
if(GetVehicleModel(vehicleid) == 407)
{
new test6[MAX_PLAYERS] = 0,test7[MAX_VEHICLES];
if(test6[playerid] == 0)
{
test7[vehicleid] = CreateObject(18646,10.0,10.0,10.0,0,0,0);
AttachObjectToVehicle(test7[vehicleid],vehicleid,0.0,0.75,0.275,0.0,0.1,0.0);
test6[playerid] = 1;
return 1;
}
if(test6[playerid] == 1)
{
DestroyObject(test7[vehicleid]);
test6[playerid] = 0;
return 1;
}
}
}
return 1;
}
Wenn ich aber das hier wegnehme if(GetVehicleModel(vehicleid) == 407)
{
new test6[MAX_PLAYERS] = 0,test7[MAX_VEHICLES];
if(test6[playerid] == 0)
{
test7[vehicleid] = CreateObject(18646,10.0,10.0,10.0,0,0,0);
AttachObjectToVehicle(test7[vehicleid],vehicleid,0.0,0.75,0.275,0.0,0.1,0.0);
test6[playerid] = 1;
return 1;
}
if(test6[playerid] == 1)
{
DestroyObject(test7[vehicleid]);
test6[playerid] = 0;
return 1;
}
}
dann geht der Befehl wieder, woran liegt das?