toribio

toribio

Jul 1st, 2010
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.22 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.  
  7. //no OnDialogResponse:
  8. if(dialogid == DIALOG_SPAWN)
  9. {
  10.     if(response) //clicou em OK
  11.     {
  12.         if(listitem == 0) //0 = primeiro item la da lista de lugares, e assim em diante...
  13.         {
  14.             //muda as coordenadas X, Y, Z em 123.0, 321.0, 12.0
  15.             SetSpawnInfo(playerid, GetPlayerTeam(playerid), GetPlayerSkin(playerid), 123.0, 321.0, 12.0, 0.0, 0, 0, 0, 0, 0, 0);
  16.         }
  17.         else if(listitem == 1) //Casa da Maria
  18.         {
  19.             //muda as coordenadas X, Y, Z em 123.0, 321.0, 12.0
  20.             SetSpawnInfo(playerid, GetPlayerTeam(playerid), GetPlayerSkin(playerid), 123.0, 321.0, 12.0, 0.0, 0, 0, 0, 0, 0, 0);
  21.         }
  22.     }
  23.     else //clicou em Cancelar
  24.     {
  25.         //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
  26.         SetSpawnInfo(playerid, GetPlayerTeam(playerid), GetPlayerSkin(playerid), 123.0, 321.0, 12.0,
  27.     }
  28.     return 1;
  29. }
Add Comment
Please, Sign In to add comment