Jump to content
  • 0

Problema Dealership


Stefan112

Question

Nickname:aQua

Problema intalnita: Buna Ziua SA-MP.RO am si eu o problema la dealership cand cumpar o masina si intru in ea nu zice ca e a mea dar eu am cumparato

A-2a problema: Eu imi iau o masina de la cumparamasina ies dupa server repornesc sa-mpserver dar masina nu ramane salvata pe server dar in localhost la cars imi apare ca sa create si cand teleportez id-ul masini la mine nu vine

Ce am incercat pana acum: sa caut pe google.ro

if(clickedid == ButonCumpara[playerid])

  {

      InsertCar(playerid);

      GivePlayerCash(playerid, -DSModele[iDDS[playerid]][2]);

      DestroyVehicle(IDmasina[playerid]);

      SetPlayerVirtualWorld(playerid,0);

      TogglePlayerControllable(playerid,1);

      SetCameraBehindPlayer(playerid);

      SetPlayerCheckpoint(playerid, -1631.0164,1289.4585,6.7459,5.0);

      CP[playerid] = 99;

      TextDrawHideForPlayer(playerid,Linie[playerid]);

      TextDrawHideForPlayer(playerid,ButonInapoi[playerid]);

      TextDrawHideForPlayer(playerid,ButonUrmator[playerid]);

      TextDrawHideForPlayer(playerid,ButonCumpara[playerid]);

      TextDrawHideForPlayer(playerid,ButonTesteaza[playerid]);

      TextDrawHideForPlayer(playerid,ButonAnuleaza[playerid]);

      TextDrawHideForPlayer(playerid,DealerPret[playerid]);

      TextDrawHideForPlayer(playerid,DealerMasina[playerid]);

      CancelSelectTextDraw(playerid);

      format(string,sizeof(string),"Ai cumparat un %s pentru %d.",vehName[DSModele[iDDS[playerid]][1]-400],DSModele[iDDS[playerid]][2]);

      SendClientMessage(playerid,COLOR_WHITE,string);

      SendClientMessage(playerid,COLOR_WHITE,"Mergi la checkpoint pentru a-ti ridica masina.");

     

  }

Am pus BUTONULCUMPARA daca va ajuta cu ceva

Multumesc pentru Ajutor!

Modify message

Scripting for $$ .

CONTACT: [email protected] .

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Pei am functia LoadCar

function LoadCar()

{

    new vehs = 0;

mysql_query("SELECT MAX(ID) FROM cars");

mysql_store_result();

masinii = mysql_fetch_int();

for(new idx = 1; idx <= masinii; idx++)

{

new query[256];

format(query,sizeof(query),"SELECT * FROM cars WHERE ID = %d",idx);

mysql_query(query);

mysql_store_result();

if(!mysql_num_rows())

{

CarInfo[idx][cID] = -2;

}

else

{

if(mysql_fetch_row_format(query,"!"))

{

sscanf(query,"p<|>e<>iiffffiis[25]is[14]iiiiiiiiiiiiiiiiiiiii",CarInfo[idx]);

vehs++;

}

}

}

mysql_free_result();

printf("-Cars: %d",vehs);

return 1;

}

Poti intra tu Gireada pe mess te rog ca sa ma ajuti sa termin si eu dealershipu?

Scripting for $$ .

CONTACT: [email protected] .

Link to comment
Share on other sites

la inceputul gamemodeului adaugi variabila

new vehicleonserver = 2;//in loc de 2 pui numarul de vehicule de pe server+1

function LoadCar()

{

    new vehs = 0;

mysql_query("SELECT MAX(ID) FROM cars");

mysql_store_result();

masinii = mysql_fetch_int();

for(new idx = vehicleonserver; idx <= MAX_VEHICLES; idx++)

{

new query[256];

format(query,sizeof(query),"SELECT * FROM cars WHERE ID = %d",idx);

mysql_query(query);

mysql_store_result();

if(mysql_num_rows() > 0)

{

if(mysql_fetch_row_format(query,"!"))

{

sscanf(query,"p<|>e<>iiffffiis[25]is[14]iiiiiiiiiiiiiiiiiiiii",CarInfo[idx]);

vehs++;

}

}

}

mysql_free_result();

printf("Cars: %d",vehs);

return 1;

}

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.