Jump to content

leon

Membru
  • Posts

    204
  • Joined

  • Last visited

    Never

Posts posted by leon

  1. Linia: 10456:

    In loc de:

    SendClientMessage(playerid,COLOR_GREEN,"_______________________________________%s_________________________________________________", name);
    pune:
    format(coordsstring, sizeof(coordsstring),"_______________________________________%s_________________________________________________", name);
    SendClientMessage(playerid, COLOR_LIGHTBLUE,coordsstring);

    10457: nu ai new plevel;

    10461: nu ai new wanted;

    10463: nu ai new virworld2;

    robstat, str,wl, expamount,account,level,cash,money,graurugate1,graurugate2: nu sunt folosite intr-un text.

    AdminLabel, GetPointDistanceToPointExMorph: nu e folosit nicaieri.

    54846: adauga inainte de ultima } return 1;.

  2. Vezi poate e ceva de genu prin gm:

    	for(new i = 0; i < MAX_VEHICLES; i++)
    	{
    		SetVehicleParamsForPlayer(carid,playerid,0,1); sau cu LockCar(i);
    	}

    Sau cauta functia SetVehicleParamsForPlayer (Daca e cu 1 la sfarsit inseamnca ca incuie) / LockCar pe rand si vezi pe unde e pusa si ce face.

  3. Posteza putin si: new TeritoriuInfo....

    Edit: Incearca asa:

    enum zInfo
    {
    	tId,
    	tOwner[64],
    	tOwned,
    	tTime,
    	Float:tPozX1,
    	Float:tPozY1,
    	Float:tPozX2,
    	Float:tPozY2,
    	Float:tPozX3,
    	Float:tPozY3,
    	Float:tPozZ3,
    };
    new TeritoriuInfo[6][zInfo];
    
    forward LoadTeritorii();
    public LoadTeritorii()
    {
    	new arrCoords[11][64];
    	new strFromFile2[256];
    	new File: file = fopen("teritori.cfg", io_read);
    	if (file)
    	{
    		new idx;
    		while (idx < sizeof(TeritoriuInfo))
    		{
    			fread(file, strFromFile2);
    			split(strFromFile2, arrCoords, '|');
    			TeritoriuInfo[idx][tId] = strval(arrCoords[0]);
                		strmid(TeritoriuInfo[idx][tOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
    			TeritoriuInfo[idx][tOwned] = strval(arrCoords[2]);
    			TeritoriuInfo[idx][tTime] = strval(arrCoords[3]);
    			TeritoriuInfo[idx][tPozX1] = floatstr(arrCoords[4]);
    			TeritoriuInfo[idx][tPozY1] = floatstr(arrCoords[5]);
    			TeritoriuInfo[idx][tPozX2] = floatstr(arrCoords[6]);
    			TeritoriuInfo[idx][tPozY2] = floatstr(arrCoords[7]);
    			TeritoriuInfo[idx][tPozX3] = floatstr(arrCoords[8]);
    			TeritoriuInfo[idx][tPozY3] = floatstr(arrCoords[9]);
    			TeritoriuInfo[idx][tPozZ3] = floatstr(arrCoords[10]);
    			idx++;
    		}
    		fclose(file);
    	}
    	return 1;
    }

  4. new PlayedRadioInZone[MAX_PLAYERS];

    OnPlayerConnect: PlayedRadioInZone[playerid] = 0;

    O poti pune la OnPlayerUpdate:

    if ( IsPlayerInRangeOfPoint( playerid, 3.0, 2421.4243, -1219.3868, 25.5528 ) &&  PlayedRadioInZone[playerid] == 0 )
    {
    	PlayAudioStreamForPlayer(playerid, " URL ", 2421.4243, -1219.3868, 25.5528, Distance, 1);
    	PlayedRadioInZone[playerid] = 1;
    } else { PlayedRadioInZone[playerid] = 0; }
    

  5. #include <a_samp>
    #define COLOR_LIGHTBLUE 0x33CCFFAA
    #define COLOR_GRAD1 0xB4B5B7FF
    #define MAX_STRING 255
    new dmv;
    new dmvc;
    new CP[MAX_PLAYERS];
    new TakingLesson[MAX_PLAYERS];
    
    forward PlayerToPoint();
    enum pInfo
    {
       pCarLic,
    }
    new PlayerInfo[MAX_PLAYERS][pInfo];
    
    new Float:gCheckpoints[24][3] = {
    {1421.1475,-1699.3237,13.2888},
    {1432.4354,-1658.6343,13.1245},
    {1432.3827,-1588.9227,13.1318},
    {1454.7500,-1480.2014,13.0978},
    {1457.2000,-1439.2382,13.1303},
    {1429.9436,-1437.6150,13.1244},
    {1423.7155,-1398.9248,13.1238},
    {1350.0922,-1393.0492,13.1469},
    {1106.5748,-1397.0431,13.1716},
    {1059.6833,-1419.8898,13.1155},
    {1035.0563,-1571.5737,13.1341},
    {1143.5441,-1574.9717,13.0121},
    {1289.9336,-1574.8125,13.1246},
    {1295.0909,-1659.1091,13.1246},
    {1295.0031,-1704.4797,13.1240},
    {1299.5117,-1817.1479,13.1245},
    {1300.8134,-1855.0059,13.1245},
    {1389.0083,-1874.1768,13.1245},
    {1523.0303,-1874.8875,13.1266},
    {1571.1161,-1872.5188,13.1252},
    {1572.3271,-1733.9789,13.1269},
    {1531.4258,-1730.1346,13.1245},
    {1437.5671,-1730.2736,13.1254},
    {1424.2367,-1694.3533,13.2030}
    };
    
    public OnPlayerConnect(playerid)
    {
        SetVehicleNumberPlate(dmvc, " School");
        return 1;
    }
    
    public OnPlayerEnterCheckpoint(playerid)
    {
        DisablePlayerCheckpoint(playerid);
        if(TakingLesson[playerid] != 0)
    	{
    		if( IsPlayerInVehicle(playerid, dmvc) )
    		{
    		    if( CP[playerid] == sizeof(gCheckpoints) )
    		    {
    				new pName[24], str[128];
    				GetPlayerName(playerid, pName, 24);
    				GivePlayerMoney(playerid, -5000);
    				format(str, 128,"dmven: Felicitari %s! Ai luat licenta de condus.", pName);
    				SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
    				RemovePlayerFromVehicle(playerid);
    				SetVehicleToRespawn(dmvc);
    				TakingLesson[playerid] = 0;
    				PlayerInfo[playerid][pCarLic] = 1;
    		    }
    		    else
    		    {
    				SetPlayerCheckpoint(playerid, gCheckpoints[CP[playerid]][0], gCheckpoints[CP[playerid]][1], gCheckpoints[CP[playerid]][2], 5.0);
    				CP[playerid]++;
    			}
    		}
    	}
        return 1;
    }
    
    public OnPlayerPickUpPickup(playerid, pickupid)
    {
       if(pickupid == dmv)
       {
          GameTextForPlayer(playerid,"~g~Bine ai venit la DMV ~n~~y~Scrie /dmv pentru licenta de condus ~n~~w~Costa: $5000", 5000, 3);
       }
    }
    
    public OnFilterScriptInit()
    {
       dmv = CreatePickup(1239, 23, 1412.8313,-1700.3066,13.5395); //dmv_DMV
       dmvc = AddStaticVehicleEx(506,1413.2147,-1717.5602,13.2899,359.6807,12,12,10); //dmv Car
    }
    
    public OnFilterScriptExit()
    {
        return 1;
    }
    
    public OnPlayerCommandText(playerid, cmdtext[])
    {
    //----------------------------------[dmv]-----------------------------------------------
       	if(strcmp(cmdtext, "/dmv", true) == 0)
    	{
    		if(IsPlayerConnected(playerid))
    		{
    		    if(PlayerInfo[playerid][pCarLic] == 0)
    		    {
    		        CP[playerid] = 0;
    		    	if(IsPlayerInRangeOfPoint(playerid, 3.0, 1412.8313, -1700.3066, 13.5395))
    		    	{
       					SetPlayerCheckpoint(playerid, gCheckpoints[0][0], gCheckpoints[0][1], gCheckpoints[0][2], 4.0);
       					CP[playerid]++;
    	    			TakingLesson[playerid] = 1;
        				PutPlayerInVehicle(playerid, dmvc, 0);
        				SendClientMessage(playerid, COLOR_LIGHTBLUE, "dmv: Please follow the checkpoints and drive safety!");
       				}
    			}
    			else
    			{
    			    SendClientMessage(playerid, COLOR_GRAD1, "   You already have a Drive License !");
    			    return 1;
    			}
    		}
    		return 1;
    	}
        return 0;
    }

  6. new CautareJucator[MAX_PLAYERS];

    OnPlayerConnect: CautareJucator[playerid] = -1;

    OnPlayerDisconnect:

    	for(new i = 0; i < GetMaxPlayers(); i++)
    	{
    		if(IsPlayerConnected(i) && CautareJucator[i] == playerid)
    		{
    			CautareJucator[i] = -1;
    			SendClientMessage(i, COLOR_YELLOW, "Jucatoru pe care il cautai a iesit de pe server !");
    		}
    	}
    
    public OnPlayerUpdate(playerid)
    {
    	if( IsPlayerConnected(playerid) )
    	{
    		if( CautareJucator[playerid] != -1 )
    		{
    			if( IsPlayerConnected(CautareJucator[playerid]) )
    			{
    				new Float:X, Float:Y, Float:Z;
    				GetPlayerPos(CautareJucator[playerid], X, Y, Z);
    				SetPlayerCheckpoint(playerid, X, Y, Z, 6);
    			}
    		}
    	}
    	return 1;
    }
    

  7. enum pInfo
    {
    Deaths,
    Kills,
    Jailed,
    Frozen,
    Level,
    pVip,
    LoggedIn,
    Registered,
    God,
    GodCar,
    TimesSpawned,
    Muted,
    MuteWarnings,
    Warnings,
    Caps,
    DoorsLocked,
    pCar,
    pPing,
    SpamCount,
    SpamTime,
    PingCount,
    PingTime,
    FailLogin,
    Coins,
    DeathMatch,
    RaceScore,
    Rank,
    };
    new PlayerInfo[MAX_PLAYERS][pInfo];
    

  8. 1. Cred ca mai ai prin GM ceva cu #define DIALOG_STYLE_INPUT, daca da sterge-o.

    2. Incearca asa:

    			gPlayerAccount[playerid] = 0;
     			new regstring[128];
    			new regname[64];
    			GetPlayerName(playerid,regname,sizeof(regname));
    			format(regstring,sizeof(regstring),"\t\t\t\t\n"#wh"Bun venit,"#color_red" %s"#wh", acest nick nu este inregistrat.",regname);
    			ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");

  9. Sal.

    Pune asta la sfarsit:

    forward IsPlayerInDM(playerid);
    public IsPlayerInDM(playerid)
    {
    	new message[256];
    	if(DM[playerid] == 1)
    	{
    		format(message, sizeof(message), "[DM-INFO] Pentru a iesi din acest DM, scrie /exitdm .");
    		SendClientMessage(playerid, 0xFFFFFFFF, message);
    	}
    	return 0;
    }

    Si adauga if(IsPlayerInDM(playerid)) la fiecare comanda de teleport.

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