22.09.2015, 21:00
(
Последний раз редактировалось MarcoAurelio; 22.09.2015 в 23:33.
)
Olб.. eu sempre busquei sistemas de GPS pro meu servidor, porem nunca encontrei um que realmente me ajuda-se, entгo decidi criar um eu mesmo..
Espero que gostem..
Credits: MarcoAurelio | ipsLeon
Код:
#include <a_samp>
#pragma tabsize 0
#define GPS 7505
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/gps", cmdtext, true))
{
ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST, "TITULO DO DIALOG", "LOCAL 1 \nLOCAL 2", "Selecionar", "Cancelar");
return 1;
}
return 0;
}
// PARA CRIAR MAIS LOCAIS, BASTA COPIAR, COLAR E ADICIONAR O LOCAL NA DIALOG, NUNCA ESQUECENDO DE ALTERAR O LISTITEM PARA O NUMERO SEGUINTE AO ANTERIOR..
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == GPS)
{
if(response)
{
if(listitem == 0) // LOCAL 1
{
SetPlayerCheckpoint(playerid, x,y,z,8.0); // COLOQUE SUA CORDENADA.. || 8.0 = Distancia da Identificaзгo
SendClientMessage(playerid, 0xFFFFFFAA, "Foi criado um Checkpoint em seu mapa..");
return 1;
}
if(listitem == 1) // LOCAL 2
{
SetPlayerCheckpoint(playerid, x,y,z,8.0); // COLOQUE SUA CORDENADA.. || 8.0 = Distancia da Identificaзгo
SendClientMessage(playerid, 0xFFFFFFAA, "Foi criado um Checkpoint em seu mapa..");
return 1;
}
}
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
DisablePlayerCheckpoint(playerid); // Destroi o CheckPoint Ao Ficar Encima do Mesmo..
return true;
}
// SISTEMA DE GPS //
//--------------------------------CREDITOS------------------------------------//
//------------------------- -...MarcoAurelio...-------------------------------//
//-----------------------------...ipsLeon...----------------------------------//
//DEIXAR SEMPRE O ULTIMO RETURN DA PUBLIC ONDIALOGRESPONSE NO VALOR 0(FALSE):D//
//----------------------------------------------------------------------------//
// FAЗA BOM USO :D //
Credits: MarcoAurelio | ipsLeon


