SA-MP Forums Archive
[Ajuda] Problema no spawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Problema no spawn (/showthread.php?tid=597320)



Problema no spawn - Sodom - 29.12.2015

Estou com um problema no momento do spawn. Quando clico no botгo spawn na seleзгo de classes, o player desaparece mas nгo spawna. Como solucionar?

Cуdigos:

Quote:

public OnPlayerRequestSpawn(playerid)
{
case ClassTruckDriver:
{

format(Msg, 128, "o player tal entrou como tal", Name);
SendClientMessageToAll(-1, Msg);
ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Resgate Caminhoneiro:", "Fallen Tree Depot\r\nFlint Trucking Depot\r\nLVA Freight Depot\r\nDoherty Depot\r\nEl Corona Depot\r\nLas Payasdas Depot\r\nShady Creek Depot\nTeste", "Spawn", "Cancelar");
return 0;
}
}




Re: Problema no spawn - F1N4L - 29.12.2015

Vc deve colocar em OnDialogResponse o que deve acontecer em cada opзгo... recomendo:
https://sampforum.blast.hk/showthread.php?tid=119297


Re: Problema no spawn - Sodom - 29.12.2015

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Vc deve colocar em OnDialogResponse o que deve acontecer em cada opзгo... recomendo:
https://sampforum.blast.hk/showthread.php?tid=119297
Eu cheguei a configurar a dialog em OnDialogResponse, mas nada...
Quote:

if(dialogid == DialogRescue)
{
if(!response) return 1;

cmd_cancelartrabalho(playerid, "");
switch (APlayerData[playerid][PlayerClass])
{

case ClassTruckDriver:
{
switch (listitem)
{
case 0: SetPlayerPos(playerid, -525.0, -502.0, 26.0);
case 1: SetPlayerPos(playerid, -74.7, -1137.5, 4.5);
case 2: SetPlayerPos(playerid, 1457.0, 975.5, 11.0);
case 3: SetPlayerPos(playerid, -2136.0, -247.5, 36.5);
case 4: SetPlayerPos(playerid, 1766.5, -2040.7, 14.0);
case 5: SetPlayerPos(playerid, -546.0, 2594.0, 54.0);
case 6: SetPlayerPos(playerid, 682.6729,860.3258,-42.4911);
case 7: SetPlayerPos(playerid, -1575.0, -2724.0, 49.0);
case 8: SetPlayerPos(playerid, 901.0223,2491.2578,17.1521);
case 9: SetPlayerPos(playerid, 1639.0813,617.7562,10.8223);
case 10: SetPlayerPos(playerid, -2583.1028,1383.5282,7.1303);
case 11: SetPlayerPos(playerid, -2915.2532,493.1855,4.9141);
case 12: SetPlayerPos(playerid, 1398.7220,-92.7890,37.2264);
case 13: SetPlayerPos(playerid, 1577.8414,334.5103,21.5080);
}
}
}




Re: Problema no spawn - F1N4L - 29.12.2015

Baah, nгo manjo muito de dialog, sou mais da textdraw... Nunca tive problemas com TD e dialog sгo boa opзгo tbm, claro, mas como eu disse, nгo sou muito fг...


Re: Problema no spawn - Sodom - 29.12.2015

Certo, obrigado pela ajuda, vou continuar vendo essa dialog... Ao certo deve estar faltando algo nela, vlw


Re: Problema no spawn - arakuta - 29.12.2015

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Vc deve colocar em OnDialogResponse o que deve acontecer em cada opзгo... recomendo:
https://sampforum.blast.hk/showthread.php?tid=119297
Vocк fala muita bosta por esse fуrum amigo, tome cuidado com as suas respostas.

@topic

O Botгo SPAWN, padrгo do sa-mp й trabalhado pela callback OnPlayerRequestSpawn.

Retornar 0 nela, impede que o jogador spawne, retorne 1 para permitir.


Re: Problema no spawn - F1N4L - 29.12.2015

Quote:
Originally Posted by arakuta
Посмотреть сообщение
Vocк fala muita bosta por esse fуrum amigo, tome cuidado com as suas respostas.

@topic

O Botгo SPAWN, padrгo do sa-mp й trabalhado pela callback OnPlayerRequestSpawn.

Retornar 0 nela, impede que o jogador spawne, retorne 1 para permitir.
Desculpa, eu errei ao dizer q vai em OnDialogResponse, o correto й OnPlayerDisconnect '----'


Re: Problema no spawn - Sodom - 30.12.2015

Quote:
Originally Posted by arakuta
Посмотреть сообщение
O Botгo SPAWN, padrгo do sa-mp й trabalhado pela callback OnPlayerRequestSpawn.

Retornar 0 nela, impede que o jogador spawne, retorne 1 para permitir.
Retornando para 1 o player spawna e a dialog aparece depois, a dialog deve aparecer apуs clicar no botгo de spawn, oque fazer?


Re: Problema no spawn - Ever_SH - 30.12.2015

Vi o cуdigo rapido por cima, acho que vocк estб teleportando o player sem ter spawnado ele. tente usar
SpawnPlayer(playerid); antes de teleportar o player.


Re: Problema no spawn - Sodom - 30.12.2015

Quote:
Originally Posted by Ever_SH
Посмотреть сообщение
Vi o cуdigo rapido por cima, acho que vocк estб teleportando o player sem ter spawnado ele. tente usar
SpawnPlayer(playerid); antes de teleportar o player.
Funcionou perfeitamente, muito obrigado pela ajuda....
Problema resolvido!
+REP