09.09.2013, 21:19
eu to achando q й o dialog que nao ta deixar salvar,
Oia,
O OnPlayerrequest
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_BEMVINDO) // Bem Vindo
{
if(response)
{
if(listitem == 0) // Logar
{
ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_LIST,"Escolha","Policial\nTraficante ","OK","Cancelar");
}
if(listitem == 1) // Sair
{
Kick(playerid);
}
}
}
if(dialogid == DIALOG_LOGAR) // Locais
{
if(response)
{
if(listitem == 0) // Ponto 1
{
SpawnPlayer(playerid);
SetPlayerPos(playerid, -1606.3955,675.6603,-5.2422);
Ponto1[playerid] = 1;
new str[80],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(str, sizeof(str),"SERVER: Bem Vindo Voce Escolheu Ser Policial %s!",pName);
SendClientMessage(playerid, COR_SERVER, str);
}
if(listitem == 1) // Ponto 2
{
SpawnPlayer(playerid);
SetPlayerPos(playerid, 2532.0879,-966.4776,81.9862);
Ponto2[playerid] = 1;
new str[80],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(str, sizeof(str),"SERVER: Bem Vindo Escolheu Ser Traficante %s!",pName);
SendClientMessage(playerid, COR_SERVER, str);
}
}
}
O OnPlayerrequest
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
InterpolateCameraPos(playerid, 1257.0072,2202.8748,41.6896, 1316.1122,2185.0850,32.1746, 20000);
InterpolateCameraLookAt(playerid, 1257.0072,2202.8748,41.6896, 1316.1122,2185.0850,32.1746, 10000);
ShowPlayerDialog(playerid, DIALOG_BEMVINDO, DIALOG_STYLE_LIST,"Bem Vindo","Logar\nSair","OK","Cancelar");
return 1;
}