Voila
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_ACCESORII)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, DIALOG_ADAUGA,DIALOG_STYLE_LIST,"Alege modelul","Model 1 \nModel 2","Selecteaza","Aluneaza");
}
if(listitem == 1)
{
EditAttachedObject(playerid, 1);
SendClientMessage(playerid, 0xFFFFFFFF, "[Testing Server]: ~g~Modifica ~r~palaria/sapca !");
}
if(listitem == 2)
{
for ( new i = 0; i < 5; i ++ )
if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) )
RemovePlayerAttachedObject( playerid, i );
}
}
return 1;
}
if(dialogid == DIALOG_ADAUGA)
{
if(response)
{
if(listitem == 0)
{
SetPlayerAttachedObject( playerid, 1, 18891, 2, 0.094485, 0.007215, 0.0, 0.000000, 0.000000, 0.000000, 1.200000, 1.200000, 1.200000 );
EditAttachedObject(playerid, 1);
}
if(listitem == 1)
{
SetPlayerAttachedObject( playerid, 1, 18891, 2, 0.094485, 0.007215, 0.0, 0.000000, 0.000000, 0.000000, 1.200000, 1.200000, 1.200000 );
EditAttachedObject(playerid, 1);
}
}
return 1;
}
return 1;
}
Greu e sa inchizi parantezele si sa aranjezi cum trebuie !