16.09.2011, 14:09
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == veiculo_de_aluguel)
{
ShowPlayerDialog(playerid, seudialogid, DIALOG_STYLE_MSGBOX, "Aluguel", "Deseja alugar o veнculo?", "Sim", "Nгo");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == seudialogid)
{
if(!response) return OnPlayerCommandText(playerid, "/sair"); //Caso clicar no segundo botгo
OnPlayerCommandText(playerid, "/alugarcarro"); //Caso clicar no primeiro botгo
return 1;
}
return 0;
}