Hey
Ich bin zurzeit an einem Selfmade dran und will machen das die Polizisten /dienst eingeben können und dann kommt ein Dialog mit verschiedenen Diensten.
So. doch das kapier ich nicht ganz.Irgendwie klappt da garnichts
Hoffe mir kann jemand helfen.
Hier der Command :
if(strcmp(cmdtext,"/dienst",true)==0)
{
if(IsPlayerInRangeOfPoint(playerid,4.0,253.7364,77.5474,1003.6406))
{
if(isPlayerInFrakt(playerid,1))
{
ShowPlayerDialog(playerid,DIALOG_DIENST,DIALOG_STYLE_LIST,"Bitte wähle deinen Dienst aus.","Normal1 \nNormal2 \nNormal3 \nSwat \nMotorad \nScharfschütze \nUnderCover","Auswählen","Abrechen");
return 1;
}
}
else
{
SendClientMessage(playerid,ROT,"Du bist nicht im Dillimore Police Department!");
}
}
Hier der Dialog:
if(dialogid==DIALOG_DIENST)
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0://normal1
{
SetPlayerSkin(playerid,280);
GivePlayerWeapon(playerid,24,50);
GivePlayerWeapon(playerid,29,500);
GivePlayerWeapon(playerid,23,1);
SetPlayerColor(playerid,BLAU);
}
case 1://normal2
{
SetPlayerSkin(playerid,282);
GivePlayerWeapon(playerid,24,50);
GivePlayerWeapon(playerid,29,500);
GivePlayerWeapon(playerid,23,1);
SetPlayerColor(playerid,BLAU);
}
case 2://normal3
{
SetPlayerSkin(playerid,283);
GivePlayerWeapon(playerid,24,50);
GivePlayerWeapon(playerid,29,500);
GivePlayerWeapon(playerid,23,1);
SetPlayerColor(playerid,BLAU);
}
case 3: //swat
{
SetPlayerSkin(playerid,285);
GivePlayerWeapon(playerid,24,50);
GivePlayerWeapon(playerid,31,650);
GivePlayerWeapon(playerid,3,1);
SetPlayerColor(playerid,BLAU);
}
case 4://motorad
{
SetPlayerSkin(playerid,284);
GivePlayerWeapon(playerid,24,50);
GivePlayerWeapon(playerid,3,1);
GivePlayerWeapon(playerid,29,500);
SetPlayerColor(playerid,BLAU);
}
case 5://snipe
{
SetPlayerSkin(playerid,165);
GivePlayerWeapon(playerid,34,40);
GivePlayerWeapon(playerid,4,1);
SetPlayerColor(playerid,BLAU);
}
case 6://undercover
{
SetPlayerSkin(playerid,250);
GivePlayerWeapon(playerid,24,50);
SetPlayerColor(playerid,BLAU);
}
}
}
}
}
}