27.07.2015, 17:27
PHP код:
new SNN;
forward abrir();
forward fechar();
eu tenho essa fs
public OnFilterScriptInit()
{
SNN = CreateObject(980,238.9748, 3437.8047, 4.1666, 0, 0, 3.0);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/1383", true) == 0)
{
ShowPlayerDialog(playerid,1697,DIALOG_STYLE_LIST," PORTAO BASE","{00FF00}ABRIR\n{FF0000}FECHAR","Selecionar" ,"Cancelar");
return 1;
}
return 0;
}
public fechar()
{
MoveObject(SNN, 238.9748, 3437.8047, 4.1666, 3.0);
return 1;
}
public abrir()
{
MoveObject(SNN, 238.9748, 3437.8047, -1.4709, 3.0);
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[ ])
{
if(dialogid == 1697) //Menu entrada 994
{
if(!response) return(playerid);
if(listitem == 0)
{
MoveObject(SNN, 238.9748, 3437.8047, -1.4709, 3.0);
return 1;
}
if(listitem == 1)
{
MoveObject(SNN, 238.9748, 3437.8047, 4.1666, 3.0);
return 1;
}
return 0;
}
return 0;
}