Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // OnPlayerCommandText
- if(strcmp(cmd,"/gps",true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"GPS","Respawn Civil\r\nHospital\r\n24/7\r\nPrefeitura\r\nDepartamento de Policia","Selecionar","Fechar");
- gpson[playerid] = 1;
- return 1;
- }
- }
- // OnDialogResponse
- if(response)
- {
- switch(dialogid == 5)
- {
- case 1:
- {
- switch(listitem)
- {
- case 0:
- {
- SetPlayerCheckpoint(playerid,1242.7544,-1699.2177,14.8672,7.0);
- format(string,sizeof(string),"~b~Respawn Civil ~w~marcado no mapa.");
- GameTextForPlayer(playerid, string, 5000, 4);
- return 1;
- }
- case 1:
- {
- SetPlayerCheckpoint(playerid,1177.4385,-1323.5903,14.0707,7.0);
- format(string,sizeof(string),"~b~Hospital ~w~marcado no mapa.");
- GameTextForPlayer(playerid, string, 5000, 4);
- }
- case 2:
- {
- SetPlayerCheckpoint(playerid,1351.5773,-1755.7181,13.3459,7.0);
- format(string,sizeof(string),"~b~24/7 ~w~Marcado no mapa.");
- GameTextForPlayer(playerid, string, 5000, 4);
- }
- case 3:
- {
- SetPlayerCheckpoint(playerid,1481.4419,-1764.6077,18.7958,7.0);
- format(string,sizeof(string),"~b~Prefeitura ~w~Marcada no mapa.");
- GameTextForPlayer(playerid, string, 5000, 4);
- }
- case 4:
- {
- SetPlayerCheckpoint(playerid,1550.6753,-1675.6946,15.5132,7.0);
- format(string,sizeof(string),"~b~Departamento de Policia ~w~marcado no mapa.");
- GameTextForPlayer(playerid, string, 5000, 4);
- }
- }
- }
- }
- }
- // OnPlayerEnterCheckpoint
- if(gpson[playerid] == 1)
- {
- new string[70];
- format(string,sizeof(string),"Você chegou no local desejado e o GPS foi desativado.");
- SendClientMessage(playerid,BLUE,string);
- DisablePlayerCheckpoint(playerid);
- gpson[playerid] = 0;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement