Jump to content

Ionut1

Membru
  • Posts

    43
  • Joined

  • Last visited

Posts posted by Ionut1

  1. Salut, am o problema la tickrate, cand dau 'F' gen sa intru intr-un vehicul imi scad tick-uri si am postat astea aici, nu stiu de la ce este cine ma poate ajuta va rog frumos. 

    		   new car = GetClosestVehicle(playerid);
    		   if(car != INVALID_VEHICLE_ID && IsPlayerNearVehicle(playerid,car,5)) 
    		   {
    			   for(new i = 0; i < 10; i++) 
    			   {
    					if(PlayerInfo[playerid][pCarKey][i] != 0) 
    					{
    						if(CarInfo[PlayerInfo[playerid][pCarKey][i]][Spawned] == car) SetVehicleParamsForPlayer(car, playerid, 0, 0);
    					}
    					if(car == RentVehicle[playerid]) SetVehicleParamsForPlayer(car, playerid, 0, 0);	
    			   }
    		   } 
    function LockCarFunction(playerid) {
    	new 
    		string[64],
    		engine,lights,alarm,doors,bonnet,boot,objective,
    		idd, car;
    		
    	if(IsPlayerInAnyVehicle(playerid)) car = GetPlayerVehicleID(playerid);
    	else car = GetClosestVehicle(playerid);
    	if(car == INVALID_VEHICLE_ID) return true;
    	else if(!IsPlayerNearVehicle(playerid, car, 5) && !IsABoat(car)) return true;
    	else if(!IsPlayerNearVehicle(playerid, car, 10) && IsABoat(car)) return true;
    	GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
    	
    	if(JobWorking[playerid] == 1 && JobVehicle[playerid] == car) {
    		if(doors == 1) {
    			format(string, sizeof(string), "~w~%s~n~~g~Deschis",aVehicleNames[GetVehicleModel(car)-400]);
    			GameTextForPlayer(playerid, string, 3000, 4);
    			SetVehicleParamsEx(car,engine,lights,alarm,0,bonnet,boot,objective);
    		}
    		else {
    			format(string, sizeof(string), "~w~%s~n~~r~Inchis",aVehicleNames[GetVehicleModel(car)-400]);
    			GameTextForPlayer(playerid, string, 3000, 4);				
    			SetVehicleParamsEx(car,engine,lights,alarm,1,bonnet,boot,objective);
    		}		
    		return true;
    	}
    	
    	if(VehicleSQL[car] != 0) {
    		idd = VehicleSQL[car];
    		if(VehicleKey[playerid] != 0 && VehicleKey[playerid] == car) {
    			if(CarInfo[idd][cLock] == 0) {
    				CarInfo[idd][cLock] = 1;
    				SetVehicleParamsEx(car,engine,lights,alarm,1,bonnet,boot,objective);
    				format(string, sizeof(string), "~w~%s~n~~r~Inchis",aVehicleNames[CarInfo[idd][cModel]-400]);
    				GameTextForPlayer(playerid, string, 5000, 4);
    			}
    			else {
    				CarInfo[idd][cLock] = 0;
    				SetVehicleParamsEx(car,engine,lights,alarm,0,bonnet,boot,objective);
    				format(string, sizeof(string), "~w~%s~n~~g~Deschis",aVehicleNames[CarInfo[idd][cModel]-400]);
    				GameTextForPlayer(playerid, string, 5000, 4);
    			}
    			mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Lockk='%d' WHERE ID=%d", CarInfo[idd][cLock], idd);
    			mysql_tquery(SQL, string, "", "");	
    			return true;
    		}
    	}
    	
    	if(GetVehicles(playerid) == 0) return true;
    	idd = FindSpawnID(car);
    	if(idd == 0) return true;
    	new succes;
    	for(new i = 0; i < 10; i++) {
    		if(PlayerInfo[playerid][pCarKey][i] == idd && idd != 0) succes = 1;
    	}
    	if(succes == 0) return true;
    
    	if(CarInfo[idd][cLock] == 0) {
    		CarInfo[idd][cLock] = 1;	
    		SetVehicleParamsEx(car,engine,lights,alarm,1,bonnet,boot,objective);
    		format(string, sizeof(string), "~w~%s~n~~r~Inchis",aVehicleNames[GetVehicleModel(car)-400]);
    		GameTextForPlayer(playerid, string, 5000, 4);
    	}
    	else {
    		CarInfo[idd][cLock] = 0;
    		SetVehicleParamsEx(car,engine,lights,alarm,0,bonnet,boot,objective);
    		format(string, sizeof(string), "~w~%s~n~~g~Deschis",aVehicleNames[GetVehicleModel(car)-400]);
    		GameTextForPlayer(playerid, string, 5000, 4);
    	}
    	mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Lockk='%d' WHERE ID=%d", CarInfo[idd][cLock], idd);
    	mysql_tquery(SQL, string, "", "");	
    	return true;
    }
    stock GetDistance2( Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2 ) return floatround( floatsqroot( ( ( x1 - x2 ) * ( x1 - x2 ) ) + ( ( y1 - y2 ) * ( y1 - y2 ) ) + ( ( z1 - z2 ) * ( z1 - z2 ) ) ) );
    forward Float:GetDistanceBetweenPoints(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2);
    public Float:GetDistanceBetweenPoints(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2) return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
    
    stock GetClosestVehicle(playerid) {
        new closestdist = 999999999, closestvehicle = -1;
        new Float:x[2],Float:y[2],Float:z[2],distance;
        for(new i; i < MAX_VEHICLES; i++) {
            GetVehiclePos(i,x[0],y[0],z[0]);
            GetPlayerPos(playerid,x[1],y[1],z[1]);
            distance = floatround(GetDistanceBetweenPoints(x[0],y[0],z[0],x[1],y[1],z[1]));
            if(distance < closestdist) {
                closestdist = distance;
                closestvehicle = i;
            }
        }
        return closestvehicle;
    }
    stock GetClosestVehicle2(playerid) {
    	new Float: Distance;
    	if(!Distance) Distance = 200.0;
    	new Float:X[2], Float:Y[2], Float:Z[2], Float:NearestPos = floatabs(Distance), NearestVehicle = INVALID_VEHICLE_ID;
    	GetPlayerPos(playerid, X[0], Y[0], Z[0]);
    	for(new i; i < MAX_VEHICLES; i++) {
    		if(!IsVehicleStreamedIn(i, playerid) || IsPlayerInVehicle(playerid, i)) continue;
    		GetVehiclePos(i, X[1], Y[1], Z[1]);
    		if(NearestPos > GetDistanceBetweenPoints(X[0], Y[0], Z[0], X[1], Y[1], Z[1])) NearestPos = GetDistanceBetweenPoints(X[0], Y[0], Z[0], X[1], Y[1], Z[1]), NearestVehicle = i;
    	}
    	return NearestVehicle;
    }

     

  2. La 01.02.2019 la 16:48, AlexRap a spus:

    REZOLVARI: 

    - sunt destul de multe puteti face si voi o comparatie intre ce am postat pana acum si asta 2k19

    - factiuni dinamice refacute

    -vehicule personale dinamice (erau dinamice da niste chestii nu erau NETESTATE), vehicule factiuni dinamice (Testate)

    -adaugata factiunea 7 pe server acea fiind TAXI LV

    - sistem de /tog.

    - /hud gen nephrite.

    - sistem rentvehicile nephrite.

    - multe altele.

    - rezolvat bug paint cu secundele.

    - procesor de comenzi YCMD.

    - multe functii refacute.

    -adaugat sistem de /roll disponibil si in /gps.

    pastrati comanda /credits din gm ms.

    - sistemul de taxi si cu fare etc tot refacut cel vechi era naspa.

    adaugate comenzi /vcreate, /vowner, /bowner, /vremove, /vmove, /howner etc

    aveti un panel de la wcode compatibil cu gm u nu in totalitate da este, a fost pus doar pe host pe localhost nu l am testat.

    Din poze se poate vedea ce am mai facut etc.

    Descoperiti in gm tot.

    Toate bugurile raportate au fost rezolvate daca mai gasiti ceva puteti posta la ajutor scripting.

    Succes cu gamemode-ul.

    multe textdraw-uri refacute, sunt gen nephrite la wanted si jail etc.

    dialog-uri pe case:.

    V-am zis asa in mare in rest descoperiti voi.

    - o mica insulita adaugata.

    clan-uri refacute etc.

    HAI RE ❤️

    Script development: @SouNNd && @AlexRap

    Pastrati comanda /credits ❤️

    /gotoarena - event arena 3 adaugata o mapa pentru events.

     

    EDITED: 

    - refacut stock-ul la factiuni e mai simplu acum daca adaugi si o factiune noua se pune automat in /factions

    - adaugat in /tog clan chat si money indicator

    - adaugat money indicator sub bani gen t4p.

    - adaugat /blockcmd si /unblockcmd gen nephrite (ex: /blockcmd /stats, /unblockcmd /stats).

     

    EDITED LINK NEW:  https://www13.zippyshare.com/v/obNGfXnb/file.html

    POZE: https://imgur.com/a/VhsQPKx

    VirusTutorial: Nu-i nevoie ca am mai postat gm uri si n au fost keyloggere.

    Bug taxi am facut topic pe ajutor scripting.

    Ajuta-ma!!!!!!!!!!!!!!!!!

  3. Acum 11 minute, Cordyandrey a spus:

    Salutare, am un include anti hack doar ca e o singura problema, acesta merge prea bine iar cand sunt admin si folosesc comanda /speed, /fly, etc primesc kick... Am incercat sa folosesc if(PlayerInfo[playerid][pAdmin] == 0) {... etc 

    dar nu am pus unde trebuie... nici nu prea stiu

    Ma poate ajuta cineva cu un sfat?

    Trebuie sa definesti cand esti ca admin sa nu iti, de-a kick 

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