Jump to content

AsSsASIN

Membru
  • Posts

    71
  • Joined

  • Last visited

    Never

Posts posted by AsSsASIN

  1. Nu pot sa fac cordonatele stiti cum pot schimba asta :

    public IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)

    {

    new Float:x, Float:y, Float:z;

    GetPlayerPos(playerid, x, y, z);

    if (x > minx && x < maxx && y > miny && y < maxy) return 1;

    return 0;

    }

    in minx miny maxx maxy?

  2. Ex asta :

    new Float:Zones[][GPSInfo] = {

    { "Police Departament Turf.",                  1508.879, -1741.078, 1721.838, -1595.012,  900.00}

    };

    A zis ca trebuie cordonatele de la 3d ceva de genu :|Cum ai afla cordonatele de la un Gangzone.

    Asa a zis MoroJr...

  3. /***********************************
    * 		  Simple GPS System 	   *
    *             Version 1            *
    *       Creator: Littlejohny       *
    *    Script by GTA-Scripting.tk    *
    ************************************/
    /* Thanks to Mabako for the Zones! */
    
    #include <a_samp>
    
    new Text:gps[MAX_PLAYERS];
    enum GPSInfo
    {
    	zone_name[30],
        Float:zone_minx,
        Float:zone_miny,
        Float:zone_minz,
        Float:zone_maxx,
        Float:zone_maxy,
        Float:zone_maxz
    }
    
    new Float:Zones[][GPSInfo] = {
    { "Police Departament Turf.",                   1508.879, -1741.078, 1721.838, -1595.012}
    };
    
    new gMax;
    new GPS_Spawned[MAX_PLAYERS];
    
    forward GPS();
    
    public OnFilterScriptInit()
    {
        print("************************************");
        print("*         Simple GPS System        *");
        print("*             Version 1            *");
        print("*       Creator: Littlejohny       *");
        print("*    Script by GTA-Scripting.tk    *");
        print("************************************");
        SetTimer("GPS", 500, 1);
        
    	gMax = GetMaxPlayers();
        
        for(new i=0; i<gMax; i++)
    	{
      	 	gps[i] = TextDrawCreate(0.0, 0.0,"GPS");
    		TextDrawAlignment(gps[i],0);
    		TextDrawBackgroundColor(gps[i],0x000000ff);
    		TextDrawFont(gps[i],3);
    		TextDrawLetterSize(gps[i],0.199999,1.100000);
    		TextDrawColor(gps[i],0xffffffff);
    		TextDrawSetOutline(gps[i],1);
    		TextDrawSetProportional(gps[i],1);
    	}
    	return 1;
    }
    
    public OnFilterScriptExit()
    {
        print("************************************");
        print("*         Simple GPS System        *");
        print("*             Version 1            *");
        print("*       Creator: Littlejohny       *");
        print("*    Script by GTA-Scripting.tk    *");
        print("************************************");
    	return 1;
    }
    
    public OnPlayerConnect(playerid)
    {
        GPS_Spawned[playerid] = 0;
    	return 1;
    }
    
    public OnPlayerSpawn(playerid)
    {
        GPS_Spawned[playerid] = 1;
    	return 1;
    }
    
    public OnPlayerDeath(playerid,killerid,reason)
    {
        GPS_Spawned[playerid] = 0;
    	return 1;
    }
    
    public GPS()
    {
    	new str[256];
        for(new i=0; i<gMax; i++)
    	{
    	    if(IsPlayerConnected(i))
    		{
    		    if(GPS_Spawned[i] == 1)
    		    {
    	    		format(str,sizeof(str),"%s", GetPlayerArea(i));
    				TextDrawSetString(gps[i], str);
    				TextDrawShowForPlayer(i, gps[i]);
    			}
    			else
    			{
    			    TextDrawHideForPlayer(i, gps[i]);
    			}
    		}
    	}
    	return 1;
    }
    
    stock GetPlayerArea(playerid)
    {
    	new str[130];
    	format(str,sizeof(str),"%s",Zones[GetPlayerZone(playerid)][zone_name]);
    	return str;
    }
    
    stock GetPlayerZone(playerid)
    {
    	new Float:x,Float:y,Float:z;
    	GetPlayerPos(playerid,x,y,z);
    	for(new i=0;i<sizeof(Zones);i++)
    	{
    		if(x > Zones[i][zone_minx] && y > Zones[i][zone_miny] && z > Zones[i][zone_minz] && x < Zones[i][zone_maxx] && y < Zones[i][zone_maxy] && z < Zones[i][zone_maxz])
    		return i;
    	}
    	return false;
    }

    Dar nu se vede unde trebuie, dupa ce m-am loghat, apare pe ecran, ce are :|?

  4. new Float:Zones[][GPSInfo] = {

    { "Police Departament Turf.",                  -2997.40, -2892.90,  -242.90, -1213.90, -1115.50,  900.00}

    };

    Nu inteleg acest cod (-2997.40, -2892.90,  -242.90, -1213.90, -1115.50,  900.00)

    Ar trebuii sa fie un Gangzone... dar sunt prea multe, ce sunt fiecare?

  5. Functia :

    public IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)

    {

    new Float:x, Float:y, Float:z;

    GetPlayerPos(playerid, x, y, z);

    if (x > minx && x < maxx && y > miny && y < maxy) return 1;

    return 0;

    }

    Scriptu pus in OnPlayerSpawn :

    if(IsPlayerInArea(playerid, -1591.064, 1702.824, -1741.078, 1539.302))

        {

            PD = TextDrawCreate(0.0, 434.0,"Police Departament Turf.");

            TextDrawFont(PD,3);

            TextDrawLetterSize(PD,10,10);

            TextDrawColor(PD,0xF6F6F6FF);

            TextDrawSetShadow(PD,1);

            TextDrawSetOutline(PD,1);

            TextDrawBackgroundColor(PD,0x000FF);

            TextDrawUseBox(PD,0);

    return 1;

        }

    LE:

    Nu se vede nimic :|

  6. Dialog :

    	if(dialogid == 4)
    	{
    		if(strlen(inputtext))
    		{
    			new tmppass[64];
    			strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
    			Encrypt(tmppass);
    			OnPlayerLogin(playerid,tmppass);
    		}
    		else
    		{
    			new loginstring[128];
    			new loginname[64];
    			GetPlayerName(playerid,loginname,sizeof(loginname));
    			format(loginstring,sizeof(loginstring),"WRONG PASSWORD\nPlease enter the correct password:",loginname);
    			ShowPlayerDialog(playerid,4,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
    		}
    	}

    Cand dau login cu orce parola m-as loga tot ma baga!

×
×
  • 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.