if(strcmp(cmd,"/dwarn",true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /dwarn[playerid]");
return 1;
}
new giveplayerid;
giveplayerid = ReturnUser(tmp);
if(IsACop(playerid))
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
ShowPlayerDialog(playerid,DIALOG_Dwarn,DIALOG_STYLE_LIST,"Warnung","SDM\nCarsurfing","Wählen","Abbrechen");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Du darfst diesen Befehl nicht benutzen!!");
}
}
return 1;
}
if(dialogid == DIALOG_Dwarn)
{
if(response)
{
switch(listitem)
{
case 0:
{
SendClientMessage(giveplayerid, COLOR_YELLOW, "Test 1 SDM");
}
case 1:
{
SendClientMessage(giveplayerid, COLOR_YELLOW, "Test 2 Carsurfing");
}
}
}
return 1;
}
Problem ist das ist Errors kriege, was ist giveplayerid etc. wie macht man das am besten? Möchte es beim Dialog beibehalten