Jump to content

Question

Posted

Salut, cum as putea face un timer pt /gps sa se poata folosi doar odata la 5 minute ??

#include <a_samp>

#pragma tabsize 0

#define COLOR_GREEN 0x33AA33AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xFF3366FF

#define Filterscript
#if defined Filterscript

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" GPS by Jofi");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" GPS by Jofi");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
		if (strcmp(cmdtext, "/gps", true)==0)
		{
				if(IsPlayerConnected(playerid))
		{
				SendClientMessage(playerid, COLOR_RED, "-----------------------------------------------------------------------------------------");
				SendClientMessage(playerid, COLOR_GREEN, "/gps [locatie] /gps2 (pagina urmatoare)");
				SendClientMessage(playerid, COLOR_GREEN, "/oprestegps (Sterge Checkpointul de pe harta)");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: CartierProGaming, Mall Banca, 24/7, Primarie");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Licente, GunShop, Ferma, CarPaint, Politie");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Pizza, Taxi, PigPen, Alhambra, S.R.I., Aeroport");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: BurgerShot, Benzinarie, Benzinarie2, Benzinarie3,");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: MasiniPersonale, VanzareMasini, Spital, FermaTractorist");
				SendClientMessage(playerid, COLOR_RED, "-----------------------------------------------------------------------------------------");
			}
   }
   		if (strcmp(cmdtext, "/gps2", true)==0)
		{
				if(IsPlayerConnected(playerid))
		{
				SendClientMessage(playerid, COLOR_RED, "----------------------------------------------------------------------------------------");
				SendClientMessage(playerid, COLOR_GREEN, "/gps [locatie]");
				SendClientMessage(playerid, COLOR_GREEN, "/oprestegps (Sterge Checkpointul de pe harta)");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: GroveStreet, Jefferson, Rodeo, SantaMaria, VeronaBeach");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Marina, Mulholland, Richman, FlintCounty, EastBeach");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: LosFlores, ElCorona, Ganton, Mall, Vinewood");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Dillimore, Blueberry, Montgomery, PalominoCreek");
				SendClientMessage(playerid, COLOR_RED, "----------------------------------------------------------------------------------------");
			}
   }


                if(IsPlayerConnected(playerid))
                
				if (strcmp(cmdtext, "/gps Licente", true)==0)
				SetPlayerCheckpoint(playerid,2053.2761,-1909.5160,13.5469,5);

				if (strcmp(cmdtext, "/gps Banca", true)==0)
				SetPlayerCheckpoint(playerid,1461.7273,-1023.7429,23.4017,5);

				if (strcmp(cmdtext, "/gps 24/7", true)==0)
				SetPlayerCheckpoint(playerid,1315.3618,-899.8662,39.1489,5);

				if (strcmp(cmdtext, "/gps MasiniPersonale", true)==0)
				SetPlayerCheckpoint(playerid,847.510620,-2128.946044,12.370815,5);

				if (strcmp(cmdtext, "/gps VanzareMasini", true)==0)
				SetPlayerCheckpoint(playerid,1612.653076,-1015.431091,23.475412,5);

				if (strcmp(cmdtext, "/gps CartierProGaming", true)==0)
				SetPlayerCheckpoint(playerid,2865.053710,-1962.187255,11.109375,5);

				if (strcmp(cmdtext, "/gps Aeroport", true)==0)
				SetPlayerCheckpoint(playerid,1599.2776,-2328.4224,13.5366,5);

				if (strcmp(cmdtext, "/gps Primarie", true)==0)
				SetPlayerCheckpoint(playerid,1480.8268,-1744.1536,13.1170,5);

				if (strcmp(cmdtext, "/gps Politie", true)==0)
				SetPlayerCheckpoint(playerid,1544.0143,-1675.6829,13.5576,5);

				if (strcmp(cmdtext, "/gps GroveStreet", true)==0)
				SetPlayerCheckpoint(playerid,2493.8511,-1669.5573,12.9113,5);

				if (strcmp(cmdtext, "/gps Jefferson", true)==0)
				SetPlayerCheckpoint(playerid,2220.9824,-1148.7661,25.3504,5);

				if (strcmp(cmdtext, "/gps Benzinarie", true)==0)
				SetPlayerCheckpoint(playerid,1005.4007,-940.1948,41.7549,5);

				if (strcmp(cmdtext, "/gps Rodeo", true)==0)
				SetPlayerCheckpoint(playerid,347.7415,-1367.7371,13.9776,5);

				if (strcmp(cmdtext, "/SantaMaria -", true)==0)
				SetPlayerCheckpoint(playerid,327.8009,-1797.7816,4.2844,5);

				if (strcmp(cmdtext, "/gps VeronaBeach", true)==0)
				SetPlayerCheckpoint(playerid,831.8949,-1819.0989,11.8452,5);

				if (strcmp(cmdtext, "/gps Marina", true)==0)
				SetPlayerCheckpoint(playerid,728.5689,-1593.4337,13.9832,5);

				if (strcmp(cmdtext, "/gps GunShop", true)==0)
				SetPlayerCheckpoint(playerid,1364.6945,-1279.8040,13.1127,5);

				if (strcmp(cmdtext, "/gps Spital", true)==0)
				SetPlayerCheckpoint(playerid,1183.3936,-1323.9601,13.1430,5);

				if (strcmp(cmdtext, "/gps Mall", true)==0)
				SetPlayerCheckpoint(playerid,1129.145751,-1443.013916,15.796875,5);

				if (strcmp(cmdtext, "/gps Mulholland", true)==0)
				SetPlayerCheckpoint(playerid,1338.9668,-694.6091,91.4037,5);

				if (strcmp(cmdtext, "/gps Richman", true)==0)
				SetPlayerCheckpoint(playerid,675.6179,-1061.0540,48.9433,5);

				if (strcmp(cmdtext, "/gps FlintCounty", true)==0)
				SetPlayerCheckpoint(playerid,-116.5864,-1186.2360,2.2648,5);

				if (strcmp(cmdtext, "/gps Benzinarie2", true)==0)
				SetPlayerCheckpoint(playerid,-116.5864,-1186.2360,2.2648,5);

				if (strcmp(cmdtext, "/gps Ferma", true)==0)
				SetPlayerCheckpoint(playerid,-376.0385,-1440.0708,25.2968,5);

				if (strcmp(cmdtext, "/gps BurgerShot", true)==0)
				SetPlayerCheckpoint(playerid,819.6470,-1619.0469,13.1127,5);

				if (strcmp(cmdtext, "/gps Taxi", true)==0)
				SetPlayerCheckpoint(playerid,1809.1172,-1864.4482,13.1492,5);

				if (strcmp(cmdtext, "/gps Pizza", true)==0)
				SetPlayerCheckpoint(playerid,2093.0984,-1807.0825,13.1196,5);

				if (strcmp(cmdtext, "/gps CarPaint", true)==0)
				SetPlayerCheckpoint(playerid,2074.3252,-1830.9292,13.1171,5);

				if (strcmp(cmdtext, "/gps EastBeach", true)==0)
				SetPlayerCheckpoint(playerid,2732.0156,-1662.9469,12.8089,5);

				if (strcmp(cmdtext, "/gps LosFlores", true)==0)
				SetPlayerCheckpoint(playerid,2729.4907,-1258.4280,59.1302,5);

				if (strcmp(cmdtext, "/gps PigPen", true)==0)
				SetPlayerCheckpoint(playerid,2418.3625,-1234.1200,23.9079,5);

				if (strcmp(cmdtext, "/gps Alhambra", true)==0)
				SetPlayerCheckpoint(playerid,1827.9978,-1683.6870,13.1136,5);

				if (strcmp(cmdtext, "/gps FermaTractorist", true)==0)
				SetPlayerCheckpoint(playerid,-37.921279,-1.555945,3.117187,5);

				if (strcmp(cmdtext, "/gps S.R.I.", true)==0)
				SetPlayerCheckpoint(playerid,1534.5702,-1448.2894,12.9553,5);

				if (strcmp(cmdtext, "/gps ElCorona", true)==0)
				SetPlayerCheckpoint(playerid,1822.0739,-2081.0579,12.9534,5);

				if (strcmp(cmdtext, "/gps Ganton", true)==0)
				SetPlayerCheckpoint(playerid,2314.2036,-1742.4119,12.9531,5);

				if (strcmp(cmdtext, "/gps Mall", true)==0)
				SetPlayerCheckpoint(playerid,1129.145751,-1443.013916,15.796875,5);

				if (strcmp(cmdtext, "/gps Vinewood", true)==0)
				SetPlayerCheckpoint(playerid,1103.8586,-941.0670,42.4828,5);

				if (strcmp(cmdtext, "/gps Dillimore", true)==0)
				SetPlayerCheckpoint(playerid,635.8654,-570.4843,15.9069,5);

				if (strcmp(cmdtext, "/gps Benzinarie3", true)==0)
				SetPlayerCheckpoint(playerid,651.2009,-563.4557,15.8840,5);

				if (strcmp(cmdtext, "/gps Blueberry", true)==0)
				SetPlayerCheckpoint(playerid,161.5037,-205.9166,1.1486,5);

				if (strcmp(cmdtext, "/gps Montgomery", true)==0)
				SetPlayerCheckpoint(playerid,1340.4523,257.0470,19.1249,5);

				if (strcmp(cmdtext, "/gps PalominoCreek", true)==0)
				SetPlayerCheckpoint(playerid,2337.7549,43.0897,26.0518,5);

				if(strcmp(cmdtext,"/oprestegps",true)==0)
 	{
		if(IsPlayerConnected(playerid))
		{
				DisablePlayerCheckpoint(playerid);
			}
		}

	return 0;
}

index.php?Name=Indecen3T

10 answers to this question

Recommended Posts

Posted

new

bool: Is_Used = true;

forward g_Timer( playerid );

public g_Timer( playerid )

{

  Is_Used = true;

  return 1;

}

Sub OnPlayerConnect pui:

Is_Used = true;

Sub OnGameModeinit pui:

SetTimer( "g_Timer", 300000, true );

Si comanda:

if (strcmp(cmdtext, "/gps2", true)==0)
		{
				if(IsPlayerConnected(playerid))
		{
				SendClientMessage(playerid, COLOR_RED, "----------------------------------------------------------------------------------------");
				SendClientMessage(playerid, COLOR_GREEN, "/gps [locatie]");
				SendClientMessage(playerid, COLOR_GREEN, "/oprestegps (Sterge Checkpointul de pe harta)");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: GroveStreet, Jefferson, Rodeo, SantaMaria, VeronaBeach");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Marina, Mulholland, Richman, FlintCounty, EastBeach");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: LosFlores, ElCorona, Ganton, Mall, Vinewood");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Dillimore, Blueberry, Montgomery, PalominoCreek");
				SendClientMessage(playerid, COLOR_RED, "----------------------------------------------------------------------------------------");
			}
   }


                if(IsPlayerConnected(playerid))
                
				if (strcmp(cmdtext, "/gps Licente", true)==0)
				SetPlayerCheckpoint(playerid,2053.2761,-1909.5160,13.5469,5);

				if (strcmp(cmdtext, "/gps Banca", true)==0)
				SetPlayerCheckpoint(playerid,1461.7273,-1023.7429,23.4017,5);

				if (strcmp(cmdtext, "/gps 24/7", true)==0)
				SetPlayerCheckpoint(playerid,1315.3618,-899.8662,39.1489,5);

				if (strcmp(cmdtext, "/gps MasiniPersonale", true)==0)
				SetPlayerCheckpoint(playerid,847.510620,-2128.946044,12.370815,5);

				if (strcmp(cmdtext, "/gps VanzareMasini", true)==0)
				SetPlayerCheckpoint(playerid,1612.653076,-1015.431091,23.475412,5);

				if (strcmp(cmdtext, "/gps CartierProGaming", true)==0)
				SetPlayerCheckpoint(playerid,2865.053710,-1962.187255,11.109375,5);

				if (strcmp(cmdtext, "/gps Aeroport", true)==0)
				SetPlayerCheckpoint(playerid,1599.2776,-2328.4224,13.5366,5);

				if (strcmp(cmdtext, "/gps Primarie", true)==0)
				SetPlayerCheckpoint(playerid,1480.8268,-1744.1536,13.1170,5);

				if (strcmp(cmdtext, "/gps Politie", true)==0)
				SetPlayerCheckpoint(playerid,1544.0143,-1675.6829,13.5576,5);

				if (strcmp(cmdtext, "/gps GroveStreet", true)==0)
				SetPlayerCheckpoint(playerid,2493.8511,-1669.5573,12.9113,5);

				if (strcmp(cmdtext, "/gps Jefferson", true)==0)
				SetPlayerCheckpoint(playerid,2220.9824,-1148.7661,25.3504,5);

				if (strcmp(cmdtext, "/gps Benzinarie", true)==0)
				SetPlayerCheckpoint(playerid,1005.4007,-940.1948,41.7549,5);

				if (strcmp(cmdtext, "/gps Rodeo", true)==0)
				SetPlayerCheckpoint(playerid,347.7415,-1367.7371,13.9776,5);

				if (strcmp(cmdtext, "/SantaMaria -", true)==0)
				SetPlayerCheckpoint(playerid,327.8009,-1797.7816,4.2844,5);

				if (strcmp(cmdtext, "/gps VeronaBeach", true)==0)
				SetPlayerCheckpoint(playerid,831.8949,-1819.0989,11.8452,5);

				if (strcmp(cmdtext, "/gps Marina", true)==0)
				SetPlayerCheckpoint(playerid,728.5689,-1593.4337,13.9832,5);

				if (strcmp(cmdtext, "/gps GunShop", true)==0)
				SetPlayerCheckpoint(playerid,1364.6945,-1279.8040,13.1127,5);

				if (strcmp(cmdtext, "/gps Spital", true)==0)
				SetPlayerCheckpoint(playerid,1183.3936,-1323.9601,13.1430,5);

				if (strcmp(cmdtext, "/gps Mall", true)==0)
				SetPlayerCheckpoint(playerid,1129.145751,-1443.013916,15.796875,5);

				if (strcmp(cmdtext, "/gps Mulholland", true)==0)
				SetPlayerCheckpoint(playerid,1338.9668,-694.6091,91.4037,5);

				if (strcmp(cmdtext, "/gps Richman", true)==0)
				SetPlayerCheckpoint(playerid,675.6179,-1061.0540,48.9433,5);

				if (strcmp(cmdtext, "/gps FlintCounty", true)==0)
				SetPlayerCheckpoint(playerid,-116.5864,-1186.2360,2.2648,5);

				if (strcmp(cmdtext, "/gps Benzinarie2", true)==0)
				SetPlayerCheckpoint(playerid,-116.5864,-1186.2360,2.2648,5);

				if (strcmp(cmdtext, "/gps Ferma", true)==0)
				SetPlayerCheckpoint(playerid,-376.0385,-1440.0708,25.2968,5);

				if (strcmp(cmdtext, "/gps BurgerShot", true)==0)
				SetPlayerCheckpoint(playerid,819.6470,-1619.0469,13.1127,5);

				if (strcmp(cmdtext, "/gps Taxi", true)==0)
				SetPlayerCheckpoint(playerid,1809.1172,-1864.4482,13.1492,5);

				if (strcmp(cmdtext, "/gps Pizza", true)==0)
				SetPlayerCheckpoint(playerid,2093.0984,-1807.0825,13.1196,5);

				if (strcmp(cmdtext, "/gps CarPaint", true)==0)
				SetPlayerCheckpoint(playerid,2074.3252,-1830.9292,13.1171,5);

				if (strcmp(cmdtext, "/gps EastBeach", true)==0)
				SetPlayerCheckpoint(playerid,2732.0156,-1662.9469,12.8089,5);

				if (strcmp(cmdtext, "/gps LosFlores", true)==0)
				SetPlayerCheckpoint(playerid,2729.4907,-1258.4280,59.1302,5);

				if (strcmp(cmdtext, "/gps PigPen", true)==0)
				SetPlayerCheckpoint(playerid,2418.3625,-1234.1200,23.9079,5);

				if (strcmp(cmdtext, "/gps Alhambra", true)==0)
				SetPlayerCheckpoint(playerid,1827.9978,-1683.6870,13.1136,5);

				if (strcmp(cmdtext, "/gps FermaTractorist", true)==0)
				SetPlayerCheckpoint(playerid,-37.921279,-1.555945,3.117187,5);

				if (strcmp(cmdtext, "/gps S.R.I.", true)==0)
				SetPlayerCheckpoint(playerid,1534.5702,-1448.2894,12.9553,5);

				if (strcmp(cmdtext, "/gps ElCorona", true)==0)
				SetPlayerCheckpoint(playerid,1822.0739,-2081.0579,12.9534,5);

				if (strcmp(cmdtext, "/gps Ganton", true)==0)
				SetPlayerCheckpoint(playerid,2314.2036,-1742.4119,12.9531,5);

				if (strcmp(cmdtext, "/gps Mall", true)==0)
				SetPlayerCheckpoint(playerid,1129.145751,-1443.013916,15.796875,5);

				if (strcmp(cmdtext, "/gps Vinewood", true)==0)
				SetPlayerCheckpoint(playerid,1103.8586,-941.0670,42.4828,5);

				if (strcmp(cmdtext, "/gps Dillimore", true)==0)
				SetPlayerCheckpoint(playerid,635.8654,-570.4843,15.9069,5);

				if (strcmp(cmdtext, "/gps Benzinarie3", true)==0)
				SetPlayerCheckpoint(playerid,651.2009,-563.4557,15.8840,5);

				if (strcmp(cmdtext, "/gps Blueberry", true)==0)
				SetPlayerCheckpoint(playerid,161.5037,-205.9166,1.1486,5);

				if (strcmp(cmdtext, "/gps Montgomery", true)==0)
				SetPlayerCheckpoint(playerid,1340.4523,257.0470,19.1249,5);

				if (strcmp(cmdtext, "/gps PalominoCreek", true)==0)
				SetPlayerCheckpoint(playerid,2337.7549,43.0897,26.0518,5);

				if(strcmp(cmdtext,"/oprestegps",true)==0)

				Is_Used = false;
 	{
		if(IsPlayerConnected(playerid))
		{
				DisablePlayerCheckpoint(playerid);
			}
		}

Posted

D:\gm\[GM] Pro-Gaming\filterscripts\GPS.pwn(17) : warning 204: symbol is assigned a value that is never used: "Is_Used"

aici e eroarea:

public g_Timer( playerid )

{

      Is_Used = true;

      return 1;

}

index.php?Name=Indecen3T
Posted

Greseala mea.

public g_Timer( playerid )

{

if( Is_Used == false )

Is_Used = true;

  return 1;

}

Posted

new bool: Is_Used = true; inlocuieste cu new Is_Used[ MAX_PLAYERS ] = 0;

Si unde foloseai Is_Used = true inlocuieste cu Is_Used[ playerid ] = 0;

Unde ai Is_Used = false inlocuieste cu Is_Used[ playerid ] = 1;

Posted

warning 211: possibly unintended assignment

Linia 16 e problema: if( Is_Used[ playerid ] = 1)

daca pun fara if(...) imi da: error 001: expected token: ";", but found "-identifier-"

nu poti sa imi faci tu tot fsul cu timer?

index.php?Name=Indecen3T
Posted

if( Is_Used[ playerid ] == 1)

Posted

nu mai da eroare dar tot il pot folosi de cate ori vreau, ce nu am facut bine??

#include <a_samp>

#pragma tabsize 0

#define COLOR_GREEN 0x33AA33AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xFF3366FF

#define Filterscript
#if defined Filterscript
new Is_Used[ MAX_PLAYERS ] = 0;

forward g_Timer( playerid );
public g_Timer( playerid )
{
   if( Is_Used[ playerid ] == 1)
         Is_Used[ playerid ] = 0;

   return 1;
}

public OnFilterScriptInit()
{
    SetTimer( "g_Timer", 300000, true );
	print("\n--------------------------------------");
	print(" GPS by Jofi");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" GPS by Jofi");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    SetTimer( "g_Timer", 300000, true );
	return 1;
}
public OnPlayerConnect(playerid)
Is_Used[ playerid ] = 0;

public OnPlayerCommandText(playerid, cmdtext[])
{
		if (strcmp(cmdtext, "/gps", true)==0)
		{
				if(IsPlayerConnected(playerid))
		{
				SendClientMessage(playerid, COLOR_RED, "-----------------------------------------------------------------------------------------");
				SendClientMessage(playerid, COLOR_GREEN, "/gps [locatie] /gps2 (pagina urmatoare)");
				SendClientMessage(playerid, COLOR_GREEN, "/oprestegps (Sterge Checkpointul de pe harta)");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: CartierProGaming, Mall Banca, 24/7, Primarie");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Licente, GunShop, Ferma, CarPaint, Politie");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Pizza, Taxi, PigPen, Alhambra, S.R.I., Aeroport");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: BurgerShot, Benzinarie, Benzinarie2, Benzinarie3,");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: MasiniPersonale, VanzareMasini, Spital, FermaTractorist");
				SendClientMessage(playerid, COLOR_RED, "-----------------------------------------------------------------------------------------");
			}
   }
   		if (strcmp(cmdtext, "/gps2", true)==0)
		{
				if(IsPlayerConnected(playerid))
		{
				SendClientMessage(playerid, COLOR_RED, "----------------------------------------------------------------------------------------");
				SendClientMessage(playerid, COLOR_GREEN, "/gps [locatie]");
				SendClientMessage(playerid, COLOR_GREEN, "/oprestegps (Sterge Checkpointul de pe harta)");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: GroveStreet, Jefferson, Rodeo, SantaMaria, VeronaBeach");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Marina, Mulholland, Richman, FlintCounty, EastBeach");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: LosFlores, ElCorona, Ganton, Mall, Vinewood");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Dillimore, Blueberry, Montgomery, PalominoCreek");
				SendClientMessage(playerid, COLOR_RED, "----------------------------------------------------------------------------------------");
			}
   }


                if(IsPlayerConnected(playerid))
                SetTimer( "g_Timer", 300000, true );
                
				if (strcmp(cmdtext, "/gps Licente", true)==0)
				SetPlayerCheckpoint(playerid,2053.2761,-1909.5160,13.5469,5);

				if (strcmp(cmdtext, "/gps Banca", true)==0)
				SetPlayerCheckpoint(playerid,1461.7273,-1023.7429,23.4017,5);

				if (strcmp(cmdtext, "/gps 24/7", true)==0)
				SetPlayerCheckpoint(playerid,1315.3618,-899.8662,39.1489,5);

				if (strcmp(cmdtext, "/gps MasiniPersonale", true)==0)
				SetPlayerCheckpoint(playerid,847.510620,-2128.946044,12.370815,5);

				if (strcmp(cmdtext, "/gps VanzareMasini", true)==0)
				SetPlayerCheckpoint(playerid,1612.653076,-1015.431091,23.475412,5);

				if (strcmp(cmdtext, "/gps CartierProGaming", true)==0)
				SetPlayerCheckpoint(playerid,2865.053710,-1962.187255,11.109375,5);

				if (strcmp(cmdtext, "/gps Aeroport", true)==0)
				SetPlayerCheckpoint(playerid,1599.2776,-2328.4224,13.5366,5);

				if (strcmp(cmdtext, "/gps Primarie", true)==0)
				SetPlayerCheckpoint(playerid,1480.8268,-1744.1536,13.1170,5);

				if (strcmp(cmdtext, "/gps Politie", true)==0)
				SetPlayerCheckpoint(playerid,1544.0143,-1675.6829,13.5576,5);

				if (strcmp(cmdtext, "/gps GroveStreet", true)==0)
				SetPlayerCheckpoint(playerid,2493.8511,-1669.5573,12.9113,5);

				if (strcmp(cmdtext, "/gps Jefferson", true)==0)
				SetPlayerCheckpoint(playerid,2220.9824,-1148.7661,25.3504,5);

				if (strcmp(cmdtext, "/gps Benzinarie", true)==0)
				SetPlayerCheckpoint(playerid,1005.4007,-940.1948,41.7549,5);

				if (strcmp(cmdtext, "/gps Rodeo", true)==0)
				SetPlayerCheckpoint(playerid,347.7415,-1367.7371,13.9776,5);

				if (strcmp(cmdtext, "/SantaMaria -", true)==0)
				SetPlayerCheckpoint(playerid,327.8009,-1797.7816,4.2844,5);

				if (strcmp(cmdtext, "/gps VeronaBeach", true)==0)
				SetPlayerCheckpoint(playerid,831.8949,-1819.0989,11.8452,5);

				if (strcmp(cmdtext, "/gps Marina", true)==0)
				SetPlayerCheckpoint(playerid,728.5689,-1593.4337,13.9832,5);

				if (strcmp(cmdtext, "/gps GunShop", true)==0)
				SetPlayerCheckpoint(playerid,1364.6945,-1279.8040,13.1127,5);

				if (strcmp(cmdtext, "/gps Spital", true)==0)
				SetPlayerCheckpoint(playerid,1183.3936,-1323.9601,13.1430,5);

				if (strcmp(cmdtext, "/gps Mall", true)==0)
				SetPlayerCheckpoint(playerid,1129.145751,-1443.013916,15.796875,5);

				if (strcmp(cmdtext, "/gps Mulholland", true)==0)
				SetPlayerCheckpoint(playerid,1338.9668,-694.6091,91.4037,5);

				if (strcmp(cmdtext, "/gps Richman", true)==0)
				SetPlayerCheckpoint(playerid,675.6179,-1061.0540,48.9433,5);

				if (strcmp(cmdtext, "/gps FlintCounty", true)==0)
				SetPlayerCheckpoint(playerid,-116.5864,-1186.2360,2.2648,5);

				if (strcmp(cmdtext, "/gps Benzinarie2", true)==0)
				SetPlayerCheckpoint(playerid,-116.5864,-1186.2360,2.2648,5);

				if (strcmp(cmdtext, "/gps Ferma", true)==0)
				SetPlayerCheckpoint(playerid,-376.0385,-1440.0708,25.2968,5);

				if (strcmp(cmdtext, "/gps BurgerShot", true)==0)
				SetPlayerCheckpoint(playerid,819.6470,-1619.0469,13.1127,5);

				if (strcmp(cmdtext, "/gps Taxi", true)==0)
				SetPlayerCheckpoint(playerid,1809.1172,-1864.4482,13.1492,5);

				if (strcmp(cmdtext, "/gps Pizza", true)==0)
				SetPlayerCheckpoint(playerid,2093.0984,-1807.0825,13.1196,5);

				if (strcmp(cmdtext, "/gps CarPaint", true)==0)
				SetPlayerCheckpoint(playerid,2074.3252,-1830.9292,13.1171,5);

				if (strcmp(cmdtext, "/gps EastBeach", true)==0)
				SetPlayerCheckpoint(playerid,2732.0156,-1662.9469,12.8089,5);

				if (strcmp(cmdtext, "/gps LosFlores", true)==0)
				SetPlayerCheckpoint(playerid,2729.4907,-1258.4280,59.1302,5);

				if (strcmp(cmdtext, "/gps PigPen", true)==0)
				SetPlayerCheckpoint(playerid,2418.3625,-1234.1200,23.9079,5);

				if (strcmp(cmdtext, "/gps Alhambra", true)==0)
				SetPlayerCheckpoint(playerid,1827.9978,-1683.6870,13.1136,5);

				if (strcmp(cmdtext, "/gps FermaTractorist", true)==0)
				SetPlayerCheckpoint(playerid,-37.921279,-1.555945,3.117187,5);

				if (strcmp(cmdtext, "/gps S.R.I.", true)==0)
				SetPlayerCheckpoint(playerid,1534.5702,-1448.2894,12.9553,5);

				if (strcmp(cmdtext, "/gps ElCorona", true)==0)
				SetPlayerCheckpoint(playerid,1822.0739,-2081.0579,12.9534,5);

				if (strcmp(cmdtext, "/gps Ganton", true)==0)
				SetPlayerCheckpoint(playerid,2314.2036,-1742.4119,12.9531,5);

				if (strcmp(cmdtext, "/gps Mall", true)==0)
				SetPlayerCheckpoint(playerid,1129.145751,-1443.013916,15.796875,5);

				if (strcmp(cmdtext, "/gps Vinewood", true)==0)
				SetPlayerCheckpoint(playerid,1103.8586,-941.0670,42.4828,5);

				if (strcmp(cmdtext, "/gps Dillimore", true)==0)
				SetPlayerCheckpoint(playerid,635.8654,-570.4843,15.9069,5);

				if (strcmp(cmdtext, "/gps Benzinarie3", true)==0)
				SetPlayerCheckpoint(playerid,651.2009,-563.4557,15.8840,5);

				if (strcmp(cmdtext, "/gps Blueberry", true)==0)
				SetPlayerCheckpoint(playerid,161.5037,-205.9166,1.1486,5);

				if (strcmp(cmdtext, "/gps Montgomery", true)==0)
				SetPlayerCheckpoint(playerid,1340.4523,257.0470,19.1249,5);

				if (strcmp(cmdtext, "/gps PalominoCreek", true)==0)
				SetPlayerCheckpoint(playerid,2337.7549,43.0897,26.0518,5);

				if(strcmp(cmdtext,"/oprestegps",true)==0)
 	{
		if(IsPlayerConnected(playerid))
		{
				DisablePlayerCheckpoint(playerid);
			}
		}

	return 0;
}

index.php?Name=Indecen3T
Posted

Ce am spus eu sa faci si ce ai facut tu.

#include <a_samp>

#pragma tabsize 0

#define COLOR_GREEN 0x33AA33AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xFF3366FF

#define FILTERSCRIPT
new Is_Used[ MAX_PLAYERS ] = 0;

forward g_Timer( playerid );
public g_Timer( playerid )
{
   if( Is_Used[ playerid ] == 1)
         Is_Used[ playerid ] = 0;

   return 1;
}

public OnFilterScriptInit()
{
    SetTimer( "g_Timer", 300000, true );
	print("\n--------------------------------------");
	print(" GPS by Jofi");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnPlayerConnect(playerid)
Is_Used[ playerid ] = 0;

public OnPlayerCommandText(playerid, cmdtext[])
{
		if (strcmp(cmdtext, "/gps", true)==0)
		{
				if(IsPlayerConnected(playerid))
		{
				SendClientMessage(playerid, COLOR_RED, "-----------------------------------------------------------------------------------------");
				SendClientMessage(playerid, COLOR_GREEN, "/gps [locatie] /gps2 (pagina urmatoare)");
				SendClientMessage(playerid, COLOR_GREEN, "/oprestegps (Sterge Checkpointul de pe harta)");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: CartierProGaming, Mall Banca, 24/7, Primarie");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Licente, GunShop, Ferma, CarPaint, Politie");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Pizza, Taxi, PigPen, Alhambra, S.R.I., Aeroport");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: BurgerShot, Benzinarie, Benzinarie2, Benzinarie3,");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: MasiniPersonale, VanzareMasini, Spital, FermaTractorist");
				SendClientMessage(playerid, COLOR_RED, "-----------------------------------------------------------------------------------------");
			}
   }
   		if (strcmp(cmdtext, "/gps2", true)==0)
		{
                              if( Is_Used[ playerid ] == 1 ) return 0;
				if(IsPlayerConnected(playerid))
		{

				SendClientMessage(playerid, COLOR_RED, "----------------------------------------------------------------------------------------");
				SendClientMessage(playerid, COLOR_GREEN, "/gps [locatie]");
				SendClientMessage(playerid, COLOR_GREEN, "/oprestegps (Sterge Checkpointul de pe harta)");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: GroveStreet, Jefferson, Rodeo, SantaMaria, VeronaBeach");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Marina, Mulholland, Richman, FlintCounty, EastBeach");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: LosFlores, ElCorona, Ganton, Mall, Vinewood");
				SendClientMessage(playerid, COLOR_ORANGE, "Locatie: Dillimore, Blueberry, Montgomery, PalominoCreek");
				SendClientMessage(playerid, COLOR_RED, "----------------------------------------------------------------------------------------");
			}
   }


                if(IsPlayerConnected(playerid))
                
				if (strcmp(cmdtext, "/gps Licente", true)==0)
				SetPlayerCheckpoint(playerid,2053.2761,-1909.5160,13.5469,5);

				if (strcmp(cmdtext, "/gps Banca", true)==0)
				SetPlayerCheckpoint(playerid,1461.7273,-1023.7429,23.4017,5);

				if (strcmp(cmdtext, "/gps 24/7", true)==0)
				SetPlayerCheckpoint(playerid,1315.3618,-899.8662,39.1489,5);

				if (strcmp(cmdtext, "/gps MasiniPersonale", true)==0)
				SetPlayerCheckpoint(playerid,847.510620,-2128.946044,12.370815,5);

				if (strcmp(cmdtext, "/gps VanzareMasini", true)==0)
				SetPlayerCheckpoint(playerid,1612.653076,-1015.431091,23.475412,5);

				if (strcmp(cmdtext, "/gps CartierProGaming", true)==0)
				SetPlayerCheckpoint(playerid,2865.053710,-1962.187255,11.109375,5);

				if (strcmp(cmdtext, "/gps Aeroport", true)==0)
				SetPlayerCheckpoint(playerid,1599.2776,-2328.4224,13.5366,5);

				if (strcmp(cmdtext, "/gps Primarie", true)==0)
				SetPlayerCheckpoint(playerid,1480.8268,-1744.1536,13.1170,5);

				if (strcmp(cmdtext, "/gps Politie", true)==0)
				SetPlayerCheckpoint(playerid,1544.0143,-1675.6829,13.5576,5);

				if (strcmp(cmdtext, "/gps GroveStreet", true)==0)
				SetPlayerCheckpoint(playerid,2493.8511,-1669.5573,12.9113,5);

				if (strcmp(cmdtext, "/gps Jefferson", true)==0)
				SetPlayerCheckpoint(playerid,2220.9824,-1148.7661,25.3504,5);

				if (strcmp(cmdtext, "/gps Benzinarie", true)==0)
				SetPlayerCheckpoint(playerid,1005.4007,-940.1948,41.7549,5);

				if (strcmp(cmdtext, "/gps Rodeo", true)==0)
				SetPlayerCheckpoint(playerid,347.7415,-1367.7371,13.9776,5);

				if (strcmp(cmdtext, "/SantaMaria -", true)==0)
				SetPlayerCheckpoint(playerid,327.8009,-1797.7816,4.2844,5);

				if (strcmp(cmdtext, "/gps VeronaBeach", true)==0)
				SetPlayerCheckpoint(playerid,831.8949,-1819.0989,11.8452,5);

				if (strcmp(cmdtext, "/gps Marina", true)==0)
				SetPlayerCheckpoint(playerid,728.5689,-1593.4337,13.9832,5);

				if (strcmp(cmdtext, "/gps GunShop", true)==0)
				SetPlayerCheckpoint(playerid,1364.6945,-1279.8040,13.1127,5);

				if (strcmp(cmdtext, "/gps Spital", true)==0)
				SetPlayerCheckpoint(playerid,1183.3936,-1323.9601,13.1430,5);

				if (strcmp(cmdtext, "/gps Mall", true)==0)
				SetPlayerCheckpoint(playerid,1129.145751,-1443.013916,15.796875,5);

				if (strcmp(cmdtext, "/gps Mulholland", true)==0)
				SetPlayerCheckpoint(playerid,1338.9668,-694.6091,91.4037,5);

				if (strcmp(cmdtext, "/gps Richman", true)==0)
				SetPlayerCheckpoint(playerid,675.6179,-1061.0540,48.9433,5);

				if (strcmp(cmdtext, "/gps FlintCounty", true)==0)
				SetPlayerCheckpoint(playerid,-116.5864,-1186.2360,2.2648,5);

				if (strcmp(cmdtext, "/gps Benzinarie2", true)==0)
				SetPlayerCheckpoint(playerid,-116.5864,-1186.2360,2.2648,5);

				if (strcmp(cmdtext, "/gps Ferma", true)==0)
				SetPlayerCheckpoint(playerid,-376.0385,-1440.0708,25.2968,5);

				if (strcmp(cmdtext, "/gps BurgerShot", true)==0)
				SetPlayerCheckpoint(playerid,819.6470,-1619.0469,13.1127,5);

				if (strcmp(cmdtext, "/gps Taxi", true)==0)
				SetPlayerCheckpoint(playerid,1809.1172,-1864.4482,13.1492,5);

				if (strcmp(cmdtext, "/gps Pizza", true)==0)
				SetPlayerCheckpoint(playerid,2093.0984,-1807.0825,13.1196,5);

				if (strcmp(cmdtext, "/gps CarPaint", true)==0)
				SetPlayerCheckpoint(playerid,2074.3252,-1830.9292,13.1171,5);

				if (strcmp(cmdtext, "/gps EastBeach", true)==0)
				SetPlayerCheckpoint(playerid,2732.0156,-1662.9469,12.8089,5);

				if (strcmp(cmdtext, "/gps LosFlores", true)==0)
				SetPlayerCheckpoint(playerid,2729.4907,-1258.4280,59.1302,5);

				if (strcmp(cmdtext, "/gps PigPen", true)==0)
				SetPlayerCheckpoint(playerid,2418.3625,-1234.1200,23.9079,5);

				if (strcmp(cmdtext, "/gps Alhambra", true)==0)
				SetPlayerCheckpoint(playerid,1827.9978,-1683.6870,13.1136,5);

				if (strcmp(cmdtext, "/gps FermaTractorist", true)==0)
				SetPlayerCheckpoint(playerid,-37.921279,-1.555945,3.117187,5);

				if (strcmp(cmdtext, "/gps S.R.I.", true)==0)
				SetPlayerCheckpoint(playerid,1534.5702,-1448.2894,12.9553,5);

				if (strcmp(cmdtext, "/gps ElCorona", true)==0)
				SetPlayerCheckpoint(playerid,1822.0739,-2081.0579,12.9534,5);

				if (strcmp(cmdtext, "/gps Ganton", true)==0)
				SetPlayerCheckpoint(playerid,2314.2036,-1742.4119,12.9531,5);

				if (strcmp(cmdtext, "/gps Mall", true)==0)
				SetPlayerCheckpoint(playerid,1129.145751,-1443.013916,15.796875,5);

				if (strcmp(cmdtext, "/gps Vinewood", true)==0)
				SetPlayerCheckpoint(playerid,1103.8586,-941.0670,42.4828,5);

				if (strcmp(cmdtext, "/gps Dillimore", true)==0)
				SetPlayerCheckpoint(playerid,635.8654,-570.4843,15.9069,5);

				if (strcmp(cmdtext, "/gps Benzinarie3", true)==0)
				SetPlayerCheckpoint(playerid,651.2009,-563.4557,15.8840,5);

				if (strcmp(cmdtext, "/gps Blueberry", true)==0)
				SetPlayerCheckpoint(playerid,161.5037,-205.9166,1.1486,5);

				if (strcmp(cmdtext, "/gps Montgomery", true)==0)
				SetPlayerCheckpoint(playerid,1340.4523,257.0470,19.1249,5);

				if (strcmp(cmdtext, "/gps PalominoCreek", true)==0)
				SetPlayerCheckpoint(playerid,2337.7549,43.0897,26.0518,5);

				if(strcmp(cmdtext,"/oprestegps",true)==0)

                               Is_Used[ playerid ] = 1;
 	{
		if(IsPlayerConnected(playerid))
		{
				DisablePlayerCheckpoint(playerid);
			}
		}

	return 0;
}

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.