Hallo Community,
Ich habe gerade in meinem Duty befehl eine fraktion hinzugefügt aber ab dem else bekomme ich den error
test.p(4353) : error 029: invalid expression, assumed zero
Hier ist der Befehl vlt kann den ja einer umschreiben oder sowas :x ich habe es schon versucht anders zu schreiben mit else if aber da bekomme ich auch einen error
ocmd:duty(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,5,215.6259,108.7542,1003.2188))
{
if(!isEingeloggt(playerid,1))return SendClientMessage(playerid,COLOR_DRED,"Du bist nicht Eingeloggt!");
if(sInfo[playerid][fraktion] == 0)return SendClientMessage(playerid,COLOR_DRED,"Du bist in keiner Fraktion!");
if(!isPlayerInFrakt(playerid,1))return SendClientMessage(playerid,COLOR_DRED,"Du bist kein Polizist!");
if(!Duty[playerid])
{
switch(sInfo[playerid][rang])
{
case 1: SetPlayerSkin(playerid,280);
case 2: SetPlayerSkin(playerid,280);
case 3: SetPlayerSkin(playerid,281);
case 4: SetPlayerSkin(playerid,281);
case 5: SetPlayerSkin(playerid,286);
case 6: SetPlayerSkin(playerid,283);
}
SendClientMessage(playerid,0x8991FFFF,"Du holst deine Marke aus dem Spind uns bist im Dienst.");
SetPlayerHealth(playerid,100),SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,3,1);
GivePlayerWeapon(playerid,24,750);
GivePlayerWeapon(playerid,25,750);
GivePlayerWeapon(playerid,29,750);
SetPlayerColor(playerid,COLOR_BLUE);
return Duty[playerid]=1;
}
SendClientMessage(playerid,0x8991FFFF,"Du legst deine Marke in den Spind und machst Feierabend.");
SetPlayerHealth(playerid,100),SetPlayerArmour(playerid,0);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid,sInfo[playerid][skin]);
SetPlayerColor(playerid,COLOR_WHITE);
Duty[playerid]=0;
}
else
{
if(IsPlayerInRangeOfPoint(playerid,5,914.6536,-1235.2256,17.2109))
{
if(!isEingeloggt(playerid,1))return SendClientMessage(playerid,COLOR_DRED,"Du bist nicht Eingeloggt!");
if(sInfo[playerid][fraktion] == 0)return SendClientMessage(playerid,COLOR_DRED,"Du bist in keiner Fraktion!");
if(!isPlayerInFrakt(playerid,2))return SendClientMessage(playerid,COLOR_DRED,"Du bist kein Oamtler!");
if(!Duty[playerid])
{
switch(sInfo[playerid][rang])
{
case 1: SetPlayerSkin(playerid,71);
case 2: SetPlayerSkin(playerid,71);
case 3: SetPlayerSkin(playerid,71);
case 4: SetPlayerSkin(playerid,71);
case 5: SetPlayerSkin(playerid,71);
case 6: SetPlayerSkin(playerid,71);
}
SendClientMessage(playerid,0x8991FFFF,"Du holst deine Marke aus dem spind uns bist im Dienst.");
SetPlayerHealth(playerid,100),SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,3,1);
GivePlayerWeapon(playerid,41,1000);
SetPlayerColor(playerid,COLOR_TURKISE);
return Duty[playerid]=1;
}
SendClientMessage(playerid,0x8991FFFF,"Du legst deine Marke in den Spind und machst Feierabend.");
SetPlayerHealth(playerid,100),SetPlayerArmour(playerid,0);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid,sInfo[playerid][skin]);
SetPlayerColor(playerid,COLOR_WHITE);
Duty[playerid]=0;
}
}
else //Ab hier kommt der Error
{
if(IsPlayerInRangeOfPoint(playerid,5,1309.9630,-1362.2280,-47.9926))
{
if(!isEingeloggt(playerid,1))return SendClientMessage(playerid,COLOR_DRED,"Du bist nicht Eingeloggt!");
if(sInfo[playerid][fraktion] == 0)return SendClientMessage(playerid,COLOR_DRED,"Du bist in keiner Fraktion!");
if(!isPlayerInFrakt(playerid,12))return SendClientMessage(playerid,COLOR_DRED,"Du bist kein FBI Beamter!");
if(!Duty[playerid])
{
switch(sInfo[playerid][rang])
{
case 1: SetPlayerSkin(playerid,165);
case 2: SetPlayerSkin(playerid,165);
case 3: SetPlayerSkin(playerid,286);
case 4: SetPlayerSkin(playerid,286);
case 5: SetPlayerSkin(playerid,286);
case 6: SetPlayerSkin(playerid,286);
}
SendClientMessage(playerid,0x8991FFFF,"Du holst deine Marke aus dem spind uns bist im Dienst.");
SetPlayerHealth(playerid,100),SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,2500);
GivePlayerWeapon(playerid,25,1000);
GivePlayerWeapon(playerid,29,2500);
SetPlayerColor(playerid,COLOR_DBLUE);
return Duty[playerid]=1;
}
SendClientMessage(playerid,0x8991FFFF,"Du legst deine Marke in den Spind und machst Feierabend.");
SetPlayerHealth(playerid,100),SetPlayerArmour(playerid,0);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid,sInfo[playerid][skin]);
SetPlayerColor(playerid,COLOR_WHITE);
Duty[playerid]=0;
}
}
return 1;
}
Hoffe mir kann da einer helfen :p
Mit freundlichen Grüßen
Jonny