Guten Tag,
InGame passiert einfach nichts, woran liegt der Fehler?
ocmd:duty(playerid,params[])
{
if(GetPVarInt(playerid,"Fraktion") == 2)
{
if(IsPlayerInRangeOfPoint(playerid,3.0,221.1050,117.9559,999.1649)) //FBI
{
ShowPlayerDialog(playerid,DIALOG_FBIDUTY,DIALOG_STYLE_LIST,"FBI Duty","Aus dem Dienst gehen\nStreifendienst\nSWAT Modus\nUndercover","Auswählen","Abbrechen");
}
}
return 1;
}
if(dialogid==DIALOG_FBIDUTY)
{
if(response==1)
{
}
if(response==0)
{
if(listitem==0) //Aus dem Dienst
{
SendClientMessage(playerid,COLOR_BLAU,"Du bist nun nicht mehr im Dienst.");
Duty[playerid] = 0;
}
if(listitem==1) //Streifendienst
{
SendClientMessage(playerid,COLOR_BLAU,"Du bist nun im Streifendienst.");
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,100);
GivePlayerWeapon(playerid,31,150);
GivePlayerWeapon(playerid,41,100);
GivePlayerWeapon(playerid,25,50);
Duty[playerid] = 1;
}
if(listitem==2) //SWAT Modus
{
SendClientMessage(playerid,COLOR_BLAU,"Du bist nun im SWAT Modus.");
SetPlayerSkin(playerid,285);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,100);
GivePlayerWeapon(playerid,31,150);
GivePlayerWeapon(playerid,41,100);
GivePlayerWeapon(playerid,25,50);
GivePlayerWeapon(playerid,34,100);
Duty[playerid] = 1;
}
if(listitem==3) //Undercover
{
SendClientMessage(playerid,COLOR_BLAU,"Du bist nun im Undercover Dienst.");
SetPlayerHealth(playerid,100);
GivePlayerWeapon(playerid,24,100);
GivePlayerWeapon(playerid,31,150);
GivePlayerWeapon(playerid,41,100);
GivePlayerWeapon(playerid,25,50);
SetPlayerSkin(playerid,233);
Duty[playerid] = 1;
}
}
}