Jump to content

Mariusik[]

Membru
  • Posts

    37
  • Joined

  • Last visited

Posts posted by Mariusik[]

  1. Acum 3 ore, .MarYuS. a spus:

    De ce nu ai continuat, ce te-a facut sa te opresti ?

     

    M-am oprit pentru ca nu mai aveam echipa si nu aveam cu cine sa testez si mna, prefer mai bine sa ma alutur unei echipe deja formate si sa-i ajut cu scriptul.

  2. Salutare, azi m-am decis sa-mi postez munca de 4luni de zile (este script facut de la 0), nu este terminat.

    Postez acest gm din motive ca nu am cu cine sa fac proiectul.

    Multumesc lui Lawl pentru ajutorul dat.

     

    Descriere GM:

    Are 11 factiuni (doar 2 sunt aproape gata)

    Sistem de admin/helper/leader.

    Sistem de minigames cu PaintBall, Capture The Flag si Cityes war (doar paint si ctf sunt gata).

    Sistem de joburi(7 joburi)

     

    Imagini: https://imgur.com/a/nyWAe

    Link Download: http://www.girlshare.ro/3489998461.4

    Virus Total: https://www.virustotal.com/#/f…5YmJkMDA6MTUxNDI5NzI3Nw==

     

    P.S: daca aveti proiecte care vor fi de durata, va pot ajuta pe partea de script.

  3. Uite cum apare (in imagine).

    			format(string, sizeof(string), "{FFFFFF}ID: {FFFF4A}%d{FFFFFF}.\nLoc de munca: {FFFF4A}%s{FFFFFF}.\nNivel minim: {FFFF4A}%d{FFFFFF}.\nFoloseste {FFFF4A}/getjob {FFFFFF}pentru a obtine acest loc de munca.", id,JobData[id][jName],JobData[id][jLevel]);
    			JobData[id][jLabel] = CreateDynamic3DTextLabel(string, -1, JobData[id][jPosx], JobData[id][jPosy], JobData[id][jPosz], 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0, -1, 100.0);
    			JobData[id][jPickup] = CreateDynamicPickup(1239, 1, JobData[id][jPosx], JobData[id][jPosy], JobData[id][jPosz], 0, 0, -1, 20.0);

     

    sa-mp-005.png

  4. Deci am facut /v cu slot infinit, ma rog.. cand dau sa se spawuneze se spauneaza dar la despawn, se despawuneaza aiurea masinile, nu masina la care am dat despawn.

    	if(dialogid == DIALOG_VEHICLES){
    		vehslot[playerid] = listitem+1;
    		if(!response) return 1;
    		if(IsVehSpawned(playerid) != 1) ShowPlayerDialog(playerid, DIALOG_VEHICLES+1, DIALOG_STYLE_LIST, "Setarile masinii", "Informatii masina\nDespawneaza\nCauta Masina\nDebug\nVinde Masina\nAdauga V.I.P", "Selecteaza", "Anuleaza");
    		else if(IsVehSpawned(playerid) == 1) ShowPlayerDialog(playerid, DIALOG_VEHICLES+1, DIALOG_STYLE_LIST, "Setarile masinii", "Informatii masina\nSpawneaza\nCauta Masina\nDebug\nVinde Masina\nAdauga V.I.P", "Selecteaza", "Anuleaza");
    	}
    	if(dialogid == DIALOG_VEHICLES+1){
    		new id = getvehslot(playerid,vehslot [playerid]);
    		if(!response) return 1;
    		switch(listitem){
    			case 0:{
    				new engine,lights,alarm,doors,bonnet,boot,objective;
    				new status[256];
    				new var[512];
    				GetVehicleParamsEx(id,engine,lights,alarm,doors,bonnet,boot,objective);
    				if(doors == 1) { status = "Incuiat"; }
    				else if(doors == 0) { status = "Descuiat"; }
    				else { status = "Descuiat"; }
    				format(string,sizeof(string),"{FFFFFF}Numele masini: {AA3333}%s{FFFFFF} | Kilometri: {AA3333}%.2f{FFFFFF} | Status: {AA3333}%s{FFFFFF}\nPret: {AA3333}%d{FFFFFF}$ Nr matriculare: {AA3333}%s",aVehicleNames[CarInfo[id][cModel] - 400],CarInfo[id][KM],status,CarInfo[id][cValue],CarInfo[id][cLicense]);
    				strcat(var, string);
    				ShowPlayerDialog(playerid, DIALOG_VEHICLES+2, DIALOG_STYLE_MSGBOX, "Informatii despre masina", var, "Ok","");
    			}
    			case 1:{
    				new gString[200];
    				if(IsVehSpawned(id) == 0){
    					if(IsVehSpawned(id) == 1) return SendClientMessage(playerid, COLOR_GREY, "Aceasta masina este spawnata.");
    					SpawnVeh(playerid, id);
    					format(gString, sizeof(gString), "Masina de tip %s s-a spawnat.", aVehicleNames[CarInfo[id][cModel]-400]);
    					SendClientMessage(playerid, COLOR_WHITE, gString);
    				}else{
    					if(IsVehSpawned(id) == 0) return SendClientMessage(playerid, COLOR_GREY, "Aceasta masina este despawnata.");
    					/*DespawnVeh(playerid, id);
    					format(gString, sizeof(gString), "Masina de tip %s s-a despawnat.", aVehicleNames[CarInfo[id][cModel]-400]);
    					SendClientMessage(playerid, COLOR_WHITE, gString);*/
    					CarInfo[id][Spawned] = 0;
    					mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Spawned='%d' WHERE ID=%d", CarInfo[id][Spawned], id);
    					mysql_tquery(SQL, string, "", "");
    					CarInfo[OwnedVeh(id)][cFuel] = Gas[id];
    					mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Fuel='%d' WHERE ID=%d", CarInfo[id][cFuel], id);
    					mysql_tquery(SQL, string, "", "");
    					mysql_format(SQL, string, sizeof(string), "UPDATE cars SET KM='%.2f' WHERE ID=%d", CarInfo[id][KM], id);
    					mysql_tquery(SQL, string, "", "");
    					OwnedVeh(id) = 0;
    					DestroyVehicle(id);
    					format(gString, sizeof(gString), "Masina de tip %s s-a despawnat.", aVehicleNames[CarInfo[id][cModel]-400]);
    					SendClientMessage(playerid, COLOR_WHITE, gString);
    				}
    			}
    		}
    	}

    Sa imi zica cineva ce am facut gresit.

    Mentionez ca este MySQL r39

  5. Acum 56 minute, Mister a spus:

    Trebuie sa folosesti textdrawtextsize pentru fiecare td in parte si sa gasesti marimile potrivite pentru a nu se suprapune ca in cazul de fata. Asta inseamna ca va trebuie sa compilezi testezi si iar sa modifici pentru ca nu cred ca vei nimeri marimea de prima data

    si cand apas esc cum fac execute ce este pe textdraw-ul "x"? Am cautat sa vad daca exista key_Esc si nu exista..

  6. Acum 4 minute, Mister a spus:

    La dialogul de vehicule trebuie sa faci o variabila sa se atribui listitem+1 iar apoi aici unde ai tu aceasta functie getvehslot sa fie apelata acea variabila gen adauga in gm new vehslot[MAX_PLAYERS];

    iar la dialogul dialog_vehicles atribui

    vehslot[playerid] = listitem+1;

    iar la 

    
    new id = getvehslot(playerid,vehslot [playerid]);

    Multumesc mult pentru ajutor, poti da T/C

  7. @Mister

    			if(listitem == 2)
    			{
    				new id = getvehslot(playerid,listitem+1);
    				new gString[200];
    				if(IsVehSpawned(id) == 0) return SendClientMessage(playerid, COLOR_ERROR, "Aceasta masina este ascunsa.");
    				vInfo[OwnedVeh(id)][vSpawned] = 0;
    				vUpdate(OwnedVeh(id), vSpawnedx);
    				vInfo[OwnedVeh(id)][vFuel] = Fuel[id];
    				vUpdate(OwnedVeh(id), vFuelx);
    				vUpdate(OwnedVeh(id), vKmx);
    				OwnedVeh(id) = 0;
    				DestroyVehicle(id);
    				format(gString, sizeof(gString), "Masina de tip %s s-a despawnat.", VehicleNames[vInfo[id][vModel]-400]);
    				SendClientMessage(playerid, COLOR_ERROR, gString);
    			}

    Vreo idee dc nu o executa? P.S: apare textul ca masina este ascunsa

  8. Acum 7 minute, Mister a spus:

    Bun tu ar trebui sa adaugi codul acesta la 

    
    DIALOG_VEHICLES
    
    if(response) // spawn
    			{
    				new id = getvehslot(playerid,listitem+1);
    				new gString[200];
    				if(IsVehSpawned(id) == 1) return SendClientMessage(playerid, COLOR_ERROR, "Aceasta masina este spawnata.");
    				SpawnVeh(playerid, id);
    				format(gString, sizeof(gString), "Masina de tip %s s-a spawnat.", VehicleNames[vInfo[id][vModel]-400]);
    				SendClientMessage(playerid, COLOR_ERROR, gString);
    			}

    pai eu vreau sa fac ca la DIALOG_vEHICLES sa fie meniul cu functile (spawn/despawn, tow, bla bla si pentru fiecare dintre ele sa fac separat).

     

    EDIT: Cum zici tu

  9. CMD:v(playerid, parms[])
    {
    	new Title[200], string[256], string1[700];
    	format(Title, sizeof(Title), "Garajul lui %s - (%d sloturi)",GetName(playerid), PlayerData[playerid][pCarSlot]);
    	new coordsstring[64] = "Nume\tStatus\tTip Masina\n";
    	if(GetVehNumber(playerid) == 0)
    	{
    		return SendClientMessage(playerid,COLOR_ERROR,"Nu ai masini personale.");
    	}
    	else
    	{
    	    for(new i = 0; i <= Total_Veh_Created; i++)
    		{
    			new type[20];
    			if(vInfo[i][vType] == 0)
    			{
    				type = "{FFFFFF}Tutorial";
    			}
    			else if(vInfo[i][vType] == 1)
    			{
    				type = "{FFFFFF}Normal";
    			}
    			else if(vInfo[i][vType] == 2)
    			{
    				type = "{FFB870}Premium";
    			}
    			else if(vInfo[i][vType] == 3)
    			{
    				type = "{FFB870}Shop";
    			}
    			if(strmatch(vInfo[i][vOwner], GetName(playerid)))
    			{
    				if(IsVehSpawned(i) == 1) format(string, sizeof(string), "{FFFFFF}%s\t{33AA33}Spawnat{FFFFFF}\t%s\n",VehicleNames[vInfo[i][vModel] - 400], type);
    				else format(string, sizeof(string), "{FFFFFF}%s\t{E60000}Ascuns{FFFFFF}\t%s\n",VehicleNames[vInfo[i][vModel] - 400], type);
    				strcat(string1, string);
    			}
    		}
    		strins(string1, coordsstring, 0);
    		ShowPlayerDialog(playerid, DIALOG_VEHICLES, DIALOG_STYLE_TABLIST_HEADERS, Title, string1, "Selecteaza", "Iesi");
    	}
    	return 1;
    }

     

  10. Acum 1 minut, Mister a spus:

    Din ce am vazut mai sus ai dialogul unde nu trebuie la comanda de /v sau cum ai tu, acolo tu arati un dialog cu fiecare masina iar dialogul modificat de mine trebuie sa aiba idul aceluia

    eu cand dau spawn, nu apare nici masina si nici un text..

  11. Acum 12 minute, Mister a spus:

    tu ai si la response si la daca nu da response sa se spawneze toate masinile

    Adauga functia asta in gm 

    
    getvehslot(playerid,slot)
    {
    	new counth=0;
    	for(new i = 0; i <= Total_Veh_Created; i++)
    	{
    		new gString[200];
    		if(strmatch(vInfo[i][vOwner], GetName(playerid)))
    		{
            	counth++;
    		    if(counth==slot)
    		    return i;
    		    
    		}
    	}
    	return -1;
    }

    Iar la dialog modifici in asta

    
    			if(response) // spawn
    			{
    				new id = getvehslot(playerid,listitem+1);
    				new gString[200];
    				if(IsVehSpawned(id) == 1) return SendClientMessage(playerid, COLOR_ERROR, "Aceasta masina este spawnata.");
    				SpawnVeh(playerid, id);
    				format(gString, sizeof(gString), "Masina de tip %s s-a spawnat.", VehicleNames[vInfo[id][vModel]-400]);
    				SendClientMessage(playerid, COLOR_ERROR, gString);
    			}

    EDIT am omis ceva

    nu executa abosult nmk

    EDIT: nici daca modific for(new i = 1; i <= Total_Veh_Created; i++)

  12. Acum 17 ore, Mister a spus:

    posteaza dialogul 

    case DIALOG_VEHICLES+1:
    		{
    			if(listitem == 0) // Info car
    			{
    				ShowPlayerDialog(playerid, DIALOG_VEHICLES+1, DIALOG_STYLE_MSGBOX, "{FFFFFF}Informatii Masina", "Test", "OK", "");
    			}
    			if(listitem == 1)
    			{
    				ShowPlayerDialog(playerid, DIALOG_VEHICLES+2, DIALOG_STYLE_MSGBOX, "{FFFFFF}Spawn/Despawn", "{FFFFFF}Pentru a spawna masina pe server apa SPAW\nDaca vrei sa ascunzi masina apasa pe DESPAWN.", "SPAWN", "DESPAWN");
    			}
    		}
    		case DIALOG_VEHICLES+2:
    		{
    			if(response) // spawn
    			{
    				new id = 0;
    				for(new i = 0; i <= Total_Veh_Created; i++)
    				{
    					new gString[200];
    					if(strmatch(vInfo[i][vOwner], GetName(playerid)))
    					{
    						if(IsVehSpawned(i) == 1) return SendClientMessage(playerid, COLOR_ERROR, "Aceasta masina este spawnata.");
    						SpawnVeh(playerid, i);
    						format(gString, sizeof(gString), "Masina de tip %s s-a spawnat.", VehicleNames[vInfo[i][vModel]-400]);
    						SendClientMessage(playerid, COLOR_ERROR, gString);
    						id++;
    					}
    				}
    			}
    			if(!response) // Despawn
    			{
    				new id = 0;
    				for(new i = 0; i <= Total_Veh_Created; i++)
    				{
    					new gString[200];
    					if(strmatch(vInfo[i][vOwner], GetName(playerid)))
    					{
    						if(IsVehSpawned(i) == 0) return SendClientMessage(playerid, COLOR_ERROR, "Aceasta masina este ascunsa.");
    						DespawnVeh(playerid);
    						format(gString, sizeof(gString), "Masina de tip %s s-a despawnat.", VehicleNames[vInfo[i][vModel]-400]);
    						SendClientMessage(playerid, COLOR_ERROR, gString);
    						id++;
    					}
    				}
    			}
    		}

     

  13. Deci am facut comanda /v pe dialog, cand dau sa se spawneze una din masini le spawneaza pe  toate 4 sau cate masini am pe numele meu, cum fac sa nu se mai spawneze toate o data, adica cand selectez prima masina toate setarile sa se executa la ea nu la toate 4 sau cate am.

  14. Acum 3 minute, Mister a spus:

    public GetVehNumber(playerid)
    {
        new nr = 0;
        for(new i = 1; i <= CarInfo[cID]; i++)

    {

    if(strmatch(CarInfo[cOwner], GetName(playerid))) nr ++;
        return nr;

    }
    }

    Daca modifici asa adica scoti && !CarInfo[cType] iti arata in /v? poate acea variabila este problema incearca sa o scoti. altceva chiar nu inteleg din ce se vede care ar fi problema

    daca o scot il arata gol, fara nici o masina, am incercat la LoadPlayerCar sa fac sa le creeze, nu le creeaza pe server, deci este ceva din tabel sau LoadPlayerCar

  15. Acum 10 minute, Mister a spus:

    Dupa cum vezi incarcarea nu se face bine, daca gmul tau este pe mysql r-40 sau 41 din ce vad ca ai zis modifica cum iti dau eu sa vezi daca merge


        mysql_pquery(handle, "SELECT * FROM  `cars` ORDER BY `ID` ASC", "LoadPlayerCar");// la ongamemodeinit dai replace la acele doua randuri

    // mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `cars`");
    //    mysql_tquery(handle, gQuery, "LoadPlayerCar", "");

     

    iar la public unde ai

    new row_count;

    modifica in 

    new row_count = cache_num_rows();

    la fel

    sa fie din comanda:

     

    CMD:v(playerid, params[])
    {
    	new string[60],string1[512],string2[700];
    	if(GetVehNumber(playerid) == 0) 
    	{
    		return SendClientMessage( playerid, COLOR_ERROR, "Tu nu ai vehicule personale!" );
    	}
    	else
    	{
    		format(string,sizeof(string), "Garajul lui %s (%d/%d Sloturi)", GetName(playerid), GetVehNumber(playerid), PlayerData[playerid][pCar]);
    		new header[64] = "Slot\tNume\tStatus";
    		for(new i = 1; i <= Total_Veh_Created; i++)
    		{
    			if(strmatch(CarInfo[i][cOwner], GetName(playerid)))
    			{
    				if(IsVehSpawned(i) == 1) format(string1,sizeof(string1), "%s\tAscuns\n",VehicleNames[CarInfo[i][cModel] -400]);
    				else format(string1,sizeof(string1), "%d\t%s\tAscuns\n",VehicleNames[CarInfo[i][cModel] -400]);
    				strcat(string2,string1);
    			}
    		}
    		strins(string2, header, 0);
    		ShowPlayerDialog(playerid,DIALOG_GARAGE,DIALOG_STYLE_TABLIST_HEADERS, string, string2, "Alege","Iesi");
    	}
    	return 1;
    }

     

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