Herzlich Willkommen habe 2 Buggs hoffe ihr könnt mir schnell helfen
1. Bei der Maske wird der Name Angezeigt
2. Das Blaulicht geht nicht auf das Auto drauf und man kann es nicht entfernen
Code 1:
COMMAND:maske(playerid,params[])
{
if(ImTutorial[playerid] != 0)return SendClientMessage(playerid,GRAU,"Du kannst keine Befehle nutzen,da du im Tutorial bist.");
if(GetPVarInt(playerid,"Eingeloggt") == 0)return SendClientMessage(playerid,GRAU,"Du bist nicht eingeloggt!");
if(Spieler[playerid][pAWAYFROMKEYBOARD] == 1)return SendClientMessage(playerid,WRONGCMD,"Du bist im AFK-Modus und kannst somit keine Befehle nutzen."),SendClientMessage(playerid,WRONGCMD,"BENUTZE: /back");
if(Spieler[playerid][pInPrison] == 1)return SendClientMessage(playerid,GRAU,"Du bist im Prison.");
if(Spieler[playerid][pFriedhof] == 1)return SendClientMessage(playerid,GRAU,"Du bist Tot.");
if(Spieler[playerid][pDeath] == 1)return SendClientMessage(playerid,GRAU,"Du bist verletzt.");
if(Spieler[playerid][pJailed] != 0)return SendClientMessage(playerid,GRAU,"Du bist im Gefängnis.");
if(Spieler[playerid][pTazerd] == 1)return SendClientMessage(playerid,GRAU,"Du bist K.O/getazert.");
if(Spieler[playerid][pCuffed] == 1)return SendClientMessage(playerid,GRAU,"Du bist gefesselt.");
new string[24],cmdtext[20];
if(Paintball[playerid] != 0)return SendClientMessage(playerid,GRAU,"Du bist in der Paintball Arena und kannst somit nicht Maskiert sein.");
if(!isPlayerInFrakt(playerid,8))return SendClientMessage(playerid,GRAU,"Du bist nicht in der jeweiligen Fraktion.");
if(Spieler[playerid][pHaveMaske] == 0)return SendClientMessage(playerid,GRAU,"Du trägst keine Maske mit dir.");
if(Spieler[playerid][pAdminOnduty] == true)return SendClientMessage(playerid,GRAU,"Du bist im Admindienst.");
if(sscanf(params,"s[20]",cmdtext))return SendClientMessage(playerid,WRONGCMD,"BENUTZE: /maske [Absetzen/Rot/Grün/Weiß]");
if(strcmp(cmdtext,"Absetzen",true) == 0)
{
if(Spieler[playerid][pMaske] == 0)return SendClientMessage(playerid,GRAU,"Du trägst keine Maske.");
Spieler[playerid][pMaske] = 0;
SetPlayerName(playerid,Spieler[playerid][pName]);
SetPlayerScore(playerid,GetPlayerLevel(playerid));
SendClientMessage(playerid,SORBLAU,"** Du hast deine Maske abgenommen **");
ShowPlayerNameTagForPlayer(playerid, playerid, 1);
RemovePlayerAttachedObject(playerid,1);
return 1;
}
if(strcmp(cmdtext,"Rot",true) == 0)
{
if(Spieler[playerid][pMaske] == 1)return SendClientMessage(playerid,GRAU,"Du trägst bereits eine Maske.");
Spieler[playerid][pMaske] = 1;
format(string,sizeof(string),"MASKIERT%i",random(50) + 122);
SetPlayerName(playerid,string);
SetPlayerScore(playerid,random(50) + 122);
ShowPlayerNameTagForPlayer(playerid, playerid, 0);
SendClientMessage(playerid,SORBLAU,"** Du ziehst deine Tarnung auf **");
SetPlayerAttachedObject(playerid,1,19037,2,0.108000,0.046000,-0.001000,79.900032,80.200012,8.999998);
return 1;
}
if(strcmp(cmdtext,"Grün",true) == 0)
{
if(Spieler[playerid][pMaske] == 1)return SendClientMessage(playerid,GRAU,"Du trägst bereits eine Maske.");
Spieler[playerid][pMaske] = 1;
format(string,sizeof(string),"MASKIERT%i",random(50) + 122);
SetPlayerName(playerid,string);
SetPlayerScore(playerid,random(50) + 122);
ShowPlayerNameTagForPlayer(playerid, playerid, 0);
SendClientMessage(playerid,SORBLAU,"** Du ziehst deine Tarnung auf **");
SetPlayerAttachedObject(playerid,1,19038,2,0.108000,0.046000,-0.001000,79.900032,80.200012,8.999998);
return 1;
}
if(strcmp(cmdtext,"Weiß",true) == 0)
{
if(Spieler[playerid][pMaske] == 1)return SendClientMessage(playerid,GRAU,"Du trägst bereits eine Maske.");
Spieler[playerid][pMaske] = 1;
format(string,sizeof(string),"MASKIERT%i",random(50) + 122);
SetPlayerName(playerid,string);
SetPlayerScore(playerid,random(50) + 122);
ShowPlayerNameTagForPlayer(playerid, playerid, 0);
SendClientMessage(playerid,SORBLAU,"** Du ziehst deine Tarnung auf **");
SetPlayerAttachedObject(playerid,1,19036,2,0.108000,0.046000,-0.001000,79.900032,80.200012,8.999998);
return 1;
}
return SendClientMessage(playerid,WRONGCMD,"BENUTZE: /maske [Absetzen/Rot/Grün/Weiß]");
}
Code 2
COMMAND:blaulicht(playerid,params[])
{
#pragma unused params
if(ImTutorial[playerid] != 0)return SendClientMessage(playerid,GRAU,"Du kannst keine Befehle nutzen,da du im Tutorial bist.");
if(GetPVarInt(playerid,"Eingeloggt") == 0)return SendClientMessage(playerid,GRAU,"Du bist nicht eingeloggt!");
if(Spieler[playerid][pAWAYFROMKEYBOARD] == 1)return SendClientMessage(playerid,WRONGCMD,"Du bist im AFK-Modus und kannst somit keine Befehle nutzen."),SendClientMessage(playerid,WRONGCMD,"BENUTZE: /back");
if(Spieler[playerid][pInPrison] == 1)return SendClientMessage(playerid,GRAU,"Du bist im Prison.");
if(Spieler[playerid][pFriedhof] == 1)return SendClientMessage(playerid,GRAU,"Du bist Tot.");
if(Spieler[playerid][pDeath] == 1)return SendClientMessage(playerid,GRAU,"Du bist verletzt.");
if(Spieler[playerid][pJailed] != 0)return SendClientMessage(playerid,GRAU,"Du bist im Gefängnis.");
if(Spieler[playerid][pTazerd] == 1)return SendClientMessage(playerid,GRAU,"Du bist K.O/getazert.");
if(Spieler[playerid][pCuffed] == 1)return SendClientMessage(playerid,GRAU,"Du bist gefesselt.");
new vehicleid = GetPlayerVehicleID(playerid),fv = IsAFraktionsVeh(playerid);
if(isPlayerInFrakt(playerid,1) || isPlayerInFrakt(playerid,2) || isPlayerInFrakt(playerid,3) || isPlayerInFrakt(playerid,6) || isPlayerInFrakt(playerid,16))
{
if(fv == -1)return SendClientMessage(playerid,GRAU,"Du sitzt in keinem Fraktionsfahrzeug.");
if(Fahrzeug[fv][Fraktion] != Spieler[playerid][pFraktion])return SendClientMessage(playerid,GRAU,"Du sitzt in keinem Fraktionsfahrzeug.");
if(Spieler[playerid][pDuty] == 0)return SendClientMessage(playerid,GRAU,"Du bist nicht im Dienst..");
if(GetPlayerVehicleSeat(playerid) != 0)return SendClientMessage(playerid,GRAU,"Nicht der Fahrer des Fahrzeugs.");
if(UCL[vehicleid] == 0)
{
if(GetCopLightsCount() >= MAX_COPLIGHTS)return SendClientMessage(playerid,GRAU,"Es wurde bereits das maximale Limit an Blaulichtern/Warnlichtern erstellt.");
if(GetVehicleModel(vehicleid) == 415)//cheetah
{
sirene[0][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[1][vehicleid] = CreateObject(18646,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[2][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[3][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[0][vehicleid],vehicleid,0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene[1][vehicleid],vehicleid,-0.4,-0.2,0.65,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene[2][vehicleid],vehicleid,0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene[3][vehicleid],vehicleid,-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
SendClientMessage(playerid,GELB,"Blaulicht angebracht.");
UCL[vehicleid] = 1;
return 1;
}
if(GetVehicleModel(vehicleid) == 426)//premier
{
sirene[0][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[1][vehicleid] = CreateObject(18646,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[2][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[3][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[0][vehicleid],vehicleid,0,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene[1][vehicleid],vehicleid,-0.5,0,0.88,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene[2][vehicleid],vehicleid,0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene[3][vehicleid],vehicleid,-0.7,2.6,0,0,0,0);//dachsirene licht
SendClientMessage(playerid,GELB,"Blaulicht angebracht.");
UCL[vehicleid] = 1;
return 1;
}
if(GetVehicleModel(vehicleid) == 470)//patriot
{
sirene[0][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[1][vehicleid] = CreateObject(18646,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[2][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[3][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[4][vehicleid] = CreateObject(19292,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[0][vehicleid],vehicleid,0,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene[1][vehicleid],vehicleid,-0.5,0.0,1.1,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene[2][vehicleid],vehicleid,0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene[3][vehicleid],vehicleid,-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
AttachObjectToVehicle(sirene[4][vehicleid],vehicleid,0,0.9,0.4,0,0,0);//Mittig im Fenster
SendClientMessage(playerid,GELB,"Blaulicht angebracht.");
UCL[vehicleid] = 1;
return 1;
}
if(GetVehicleModel(vehicleid) == 490)//FBI Ranger
{
sirene[0][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[1][vehicleid] = CreateObject(19419,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[2][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[3][vehicleid] = CreateObject(19292,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[4][vehicleid] = CreateObject(19280,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[5][vehicleid] = CreateObject(19280,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[0][vehicleid],vehicleid,0,2.9,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene[1][vehicleid],vehicleid,0.0,0.4,1.1,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene[2][vehicleid],vehicleid,-0.7,2.9,0,0,0,0);//Vorne Licht Fahrerseite
AttachObjectToVehicle(sirene[3][vehicleid],vehicleid,0,0.9,0.4,0,0,0);//Mittig im Fenster
AttachObjectToVehicle(sirene[4][vehicleid],vehicleid,0.8,2.9,-0.45,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene[5][vehicleid],vehicleid,-0.8,2.9,-0.45,0,0,0);//Vorne Licht Fahrerseite
SendClientMessage(playerid,GELB,"Blaulicht angebracht.");
UCL[vehicleid] = 1;
return 1;
}
if(GetVehicleModel(vehicleid) == 541)//bullet
{
sirene[0][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[1][vehicleid] = CreateObject(18646,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[2][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[3][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[0][vehicleid],vehicleid,0,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene[1][vehicleid],vehicleid,-0.45,-0.1,0.65,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene[2][vehicleid],vehicleid,0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene[3][vehicleid],vehicleid,-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
SendClientMessage(playerid,GELB,"Blaulicht angebracht.");
UCL[vehicleid] = 1;
return 1;
}
if(GetVehicleModel(vehicleid) == 560)//sultan
{
sirene[0][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[1][vehicleid] = CreateObject(18646,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[2][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[3][vehicleid] = CreateObject(19292,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[4][vehicleid] = CreateObject(19280,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[5][vehicleid] = CreateObject(19280,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[0][vehicleid],vehicleid,0,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene[1][vehicleid],vehicleid,-0.5,0,0.88,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene[2][vehicleid],vehicleid,-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
AttachObjectToVehicle(sirene[3][vehicleid],vehicleid,0,0.9,0.4,0,0,0);//Mittig im Fenster
AttachObjectToVehicle(sirene[4][vehicleid],vehicleid,0.3,2.6,-0.3,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene[5][vehicleid],vehicleid,-0.3,2.6,-0.3,0,0,0);//Vorne Licht Fahrerseite
SendClientMessage(playerid,GELB,"Blaulicht angebracht.");
UCL[vehicleid] = 1;
return 1;
}
if(GetVehicleModel(vehicleid) == 601)//SWAT
{
sirene[0][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[1][vehicleid] = CreateObject(18646,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[2][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
sirene[3][vehicleid] = CreateObject(19288,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[0][vehicleid],vehicleid,0,2.9,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene[1][vehicleid],vehicleid,0.5,-2.7,1.3,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene[2][vehicleid],vehicleid,0.7,2.9,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene[3][vehicleid],vehicleid,-0.7,2.9,0,0,0,0);//Vorne Licht Fahrerseite
SendClientMessage(playerid,GELB,"Blaulicht angebracht.");
UCL[vehicleid] = 1;
return 1;
}
return SendClientMessage(playerid,GRAU,"Du kannst auf diesem Fahrzeug kein Blaulicht errichten!");
}
else if(UCL[vehicleid] == 1)
{
for(new i=0;i<10;i++){ DestroyObject(sirene[i][vehicleid]); }
SendClientMessage(playerid,GELB,"Blaulicht entfernt.");
UCL[vehicleid] = 0;
return 1;
}
}
return SendClientMessage(playerid,GRAU,"Du bist nicht in der jeweiligen Fraktion.");
}
Danke schonmal im vorraus
mfg. CranK