toribio

toribio

Jul 1st, 2010
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.26 KB | None | 0 0
  1. //no topo
  2. #define DIALOG_SPAWN 5833 //escolhe qualquer número que não seja usado em outro dialog
  3.  
  4. //no OnPlayerRequestSpawn:
  5. ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "Escolha o spawn", "Casa do Jão\nCasa da Maria", "OK", "Cancelar");
  6. return 0;
  7.  
  8. //no OnDialogResponse:
  9. if(dialogid == DIALOG_SPAWN)
  10. {
  11.     if(response) //clicou em OK
  12.     {
  13.         if(listitem == 0) //0 = primeiro item la da lista de lugares, e assim em diante...
  14.         {
  15.             //muda as coordenadas X, Y, Z em 123.0, 321.0, 12.0
  16.             SetSpawnInfo(playerid, GetPlayerTeam(playerid), GetPlayerSkin(playerid), 123.0, 321.0, 12.0, 0.0, 0, 0, 0, 0, 0, 0);
  17.         }
  18.         else if(listitem == 1) //Casa da Maria
  19.         {
  20.             //muda as coordenadas X, Y, Z em 123.0, 321.0, 12.0
  21.             SetSpawnInfo(playerid, GetPlayerTeam(playerid), GetPlayerSkin(playerid), 123.0, 321.0, 12.0, 0.0, 0, 0, 0, 0, 0, 0);
  22.         }
  23.     }
  24.     else //clicou em Cancelar
  25.     {
  26.         //muda as coordenadas X, Y, Z em 123.0, 321.0, 12.0 para as coordenadas de um lugar padrão, quando o jogador não escolhe onde nascer
  27.         SetSpawnInfo(playerid, GetPlayerTeam(playerid), GetPlayerSkin(playerid), 123.0, 321.0, 12.0,
  28.     }
  29.     SpawnPlayer(playerid);
  30.     return 1;
  31. }
Add Comment
Please, Sign In to add comment