Mein UCL befehl:
//============================= Undercover Lights ======================//
if(!strcmp("/ucl",cmdtext,true))
{
if(IsACop(playerid))
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560)
{
if(UCL[playerid] == 0)
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "undercover", CreateDynamicObject(18646,0,0,0,0,0,0));
AttachDynamicObjectToVehicle(GetPVarInt(playerid, "undercover"), GetPlayerVehicleID(playerid), 0.000000,-0.075000,0.828999,0.000000,0.000000,0.000000);
SendClientMessage(playerid, 0xFFFFFFAA, "Undercover Lichter Installiert. Lösch sie wieder mit /ucldel");
UCL[playerid] = 1;
}
}
else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 411)
{
if(UCL[playerid] == 0)
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "undercover", CreateDynamicObject(186460,0,0,0,0,0));
AttachDynamicObjectToVehicle(GetPVarInt(playerid, "undercover"), GetPlayerVehicleID(playerid), 0.000000,-0.075000,0.688999,0.000000,0.000000,0.000000);
SendClientMessage(playerid, 0xFFFFFFAA, "Undercover Lichter Installiert. Lösch sie wieder mit /ucldel");
UCL[playerid] = 1;
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD1,"* Du musst in einem Undercovercar(Sultan) sitzen!");
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD1,"* Du bist kein Polizist!");
}
return 1;
}
if(!strcmp("/ucldel",cmdtext,true))
{
if(IsACop(playerid))
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560)
{
if(UCL[playerid] == 1)
{
DeletePVar(playerid, "Status");
DestroyDynamicObject(GetPVarInt(playerid, "undercover"));
SendClientMessage(playerid,COLOR_GRAD1,"* Undercover Lichter entfernt.");
UCL[playerid] = 0;
}
}
else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 411)
{
if(UCL[playerid] == 1)
{
DeletePVar(playerid, "Status");
DestroyDynamicObject(GetPVarInt(playerid, "undercover"));
SendClientMessage(playerid,COLOR_GRAD1,"* Undercover Lichter entfernt.");
UCL[playerid] = 0;
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD1,"* Du bist in keine Auto!");
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD1,"* Du bist kein Polizist!");
}
return 1;
}
Errors:
C:\Dokumente und Einstellungen\Daniel\Desktop\WoS\WoS.pwn(25716) : error 017: undefined symbol "UCL"
C:\Dokumente und Einstellungen\Daniel\Desktop\WoS\WoS.pwn(25716) : error 001: expected token: ";", but found "]"
C:\Dokumente und Einstellungen\Daniel\Desktop\WoS\WoS.pwn(25716) : error 029: invalid expression, assumed zero
C:\Dokumente und Einstellungen\Daniel\Desktop\WoS\WoS.pwn(25716) : fatal error 107: too many error messages on one line