Guten Abend,
wollt mal fragen wie man des Ressourcen sparender macht.
Der Compiler braucht außerdem sehr sehr lang wenn ich den code drin hab.
Code
switch(Spieler[playerid][pistolxp])
{
case 0..999:{ SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL, 1);}
case 1000..1999:{ SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL, 700); SendClientMessage(playerid,rot,"Waffenskill ( 9mm ): Level 1");}
case 2000..3999:{ SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL, 800); SendClientMessage(playerid,rot,"Waffenskill ( 9mm ): Level 2");}
case 4000..7999:{ SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL, 900); SendClientMessage(playerid,rot,"Waffenskill ( 9mm ): Level 3");}
case 8000..15999:{ SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL, 998);SendClientMessage(playerid,rot,"Waffenskill ( 9mm ): Level 4");}
case 16000..32000:{ SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL, 999);SendClientMessage(playerid,rot,"Waffenskill ( 9mm ): Level 5 max.");}
}
switch(Spieler[playerid][sdpistolxp])
{
case 0..999: {SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED, 1);}
case 1000..1999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED, 700); SendClientMessage(playerid,rot,"Waffenskill ( 9mm + SD ): Level 1");}
case 2000..3999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED, 800); SendClientMessage(playerid,rot,"Waffenskill ( 9mm + SD ): Level 2");}
case 4000..7999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED, 900); SendClientMessage(playerid,rot,"Waffenskill ( 9mm + SD ): Level 3");}
case 8000..15999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED, 998);SendClientMessage(playerid,rot,"Waffenskill ( 9mm + SD ): Level 4");}
case 16000..32000:{SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED, 999);SendClientMessage(playerid,rot,"Waffenskill ( 9mm + SD ): Level 5 max.");}
}
switch(Spieler[playerid][deaglexp])
{
case 0..999:{ SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE, 1);}
case 1000..1999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE, 700); SendClientMessage(playerid,rot,"Waffenskill ( Deagle ): Level 1");}
case 2000..3999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE, 800); SendClientMessage(playerid,rot,"Waffenskill ( Deagle ): Level 2");}
case 4000..7999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE, 900); SendClientMessage(playerid,rot,"Waffenskill ( Deagle ): Level 3");}
case 8000..15999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE, 998);SendClientMessage(playerid,rot,"Waffenskill ( Deagle ): Level 4");}
case 16000..32000:{SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE, 999);SendClientMessage(playerid,rot,"Waffenskill ( Deagle ): Level 5 max.");}
}
switch(Spieler[playerid][ak47xp])
{
case 0..999:{ SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47, 1);}
case 1000..1999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47, 700); SendClientMessage(playerid,rot,"Waffenskill ( AK-47 ): Level 1");}
case 2000..3999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47, 800); SendClientMessage(playerid,rot,"Waffenskill ( AK-47 ): Level 2");}
case 4000..7999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47, 900); SendClientMessage(playerid,rot,"Waffenskill ( AK-47 ): Level 3");}
case 8000..15999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47, 998);SendClientMessage(playerid,rot,"Waffenskill ( AK-47 ): Level 4");}
case 16000..32000:{SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47, 999);SendClientMessage(playerid,rot,"Waffenskill ( AK-47 ): Level 5 max.");}
}
switch(Spieler[playerid][m4xp])
{
case 0..999:{ SetPlayerSkillLevel(playerid,WEAPONSKILL_M4, 1);}
case 1000..1999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_M4, 700); SendClientMessage(playerid,rot,"Waffenskill ( M4a1 ): Level 1");}
case 2000..3999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_M4, 800); SendClientMessage(playerid,rot,"Waffenskill ( M4a1 ): Level 2");}
case 4000..7999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_M4, 900); SendClientMessage(playerid,rot,"Waffenskill ( M4a1 ): Level 3");}
case 8000..15999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_M4, 998);SendClientMessage(playerid,rot,"Waffenskill ( M4a1 ): Level 4");}
case 16000..32000:{SetPlayerSkillLevel(playerid,WEAPONSKILL_M4, 999);SendClientMessage(playerid,rot,"Waffenskill ( M4a1 ): Level 5 max.");}
}
switch(Spieler[playerid][mp5xp])
{
case 0..999:{ SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5, 1);}
case 1000..1999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5, 700); SendClientMessage(playerid,rot,"Waffenskill ( Mp5 ): Level 1");}
case 2000..3999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5, 800); SendClientMessage(playerid,rot,"Waffenskill ( Mp5 ): Level 2");}
case 4000..7999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5, 900); SendClientMessage(playerid,rot,"Waffenskill ( Mp5 ): Level 3");}
case 8000..15999:{SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5, 998);SendClientMessage(playerid,rot,"Waffenskill ( Mp5 ): Level 4");}
case 16000..32000:{SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5, 999);SendClientMessage(playerid,rot,"Waffenskill ( Mp5 ): Level 5 max.");}
}
Alles anzeigen
Wäre cool wenn mir jmd. helfen könnte
MfG