Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //no topo
- #define DIALOG_SPAWN 5833 //escolhe qualquer número que não seja usado em outro dialog
- //no OnPlayerRequestSpawn:
- ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "Escolha o spawn", "Casa do Jão\nCasa da Maria", "OK", "Cancelar");
- return 0;
- //no OnDialogResponse:
- if(dialogid == DIALOG_SPAWN)
- {
- if(response) //clicou em OK
- {
- if(listitem == 0) //0 = primeiro item la da lista de lugares, e assim em diante...
- {
- //muda as coordenadas X, Y, Z em 123.0, 321.0, 12.0
- SetSpawnInfo(playerid, GetPlayerTeam(playerid), GetPlayerSkin(playerid), 123.0, 321.0, 12.0, 0.0, 0, 0, 0, 0, 0, 0);
- }
- else if(listitem == 1) //Casa da Maria
- {
- //muda as coordenadas X, Y, Z em 123.0, 321.0, 12.0
- SetSpawnInfo(playerid, GetPlayerTeam(playerid), GetPlayerSkin(playerid), 123.0, 321.0, 12.0, 0.0, 0, 0, 0, 0, 0, 0);
- }
- }
- else //clicou em Cancelar
- {
- //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
- SetSpawnInfo(playerid, GetPlayerTeam(playerid), GetPlayerSkin(playerid), 123.0, 321.0, 12.0,
- }
- SpawnPlayer(playerid);
- return 1;
- }
Add Comment
Please, Sign In to add comment