Jump to content

Despre /Vehicle


H3AtonN

Recommended Posts

Salut.Am si eu un gm de pe net,si de o perioada,tot schimb chestii la el,in fine.. La acest gm,sistemul de /vehicle,este asta:

CMD:vehicle(playerid, params[])
{
    return cmd_vehicles(playerid, params);
}
CMD:v(playerid, params[]) {
    return cmd_vehicles(playerid, params);
}

CMD:vehicles(playerid, params[])
{
    format(gString, sizeof(gString), "Spawn Vehicle\nTow Vehicle\nLocate Vehicle\nVehicles Info\n{FFCC00}[+] Add vehicle slots - {FFFF00}2.500{FFCC00} Gold");
    ShowPlayerDialog(playerid, DIALOG_VPANEL, DIALOG_STYLE_LIST, "Personal Vehicles Panel", gString, "Select", "Exit");
    return 1;
}
CMD:vehswitch(playerid, params[])
{
    if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
    if(GetVehNumber(playerid) == 0 && GetTutVeh(playerid) == 0)
    {
        return SendClientMessage(playerid,COLOR_ERROR,"You do not currently own a vehicle.");
    }
    else
    {
        new var[512];
        for(new i = 1; i <= Total_Veh_Created; i++)
        {
            if(strmatch(vInfo[vOwner], GetName(playerid)))
            {
                if(IsVehSpawned(i) == 1) format(gString, sizeof(gString), "{FFFFFF}%s {33AA33}SPAWNED\n", VehicleNames[vInfo[vModel] - 400]);
                else format(gString, sizeof(gString), "{FFFFFF}%s {F81414}DESPAWNED\n", VehicleNames[vInfo[vModel] - 400]);
                strcat(var, gString);
            }
        }
        ShowPlayerDialog(playerid, DIALOG_VEHSWITCH, DIALOG_STYLE_LIST, "Vehicles", var, "Switch", "Exit");
    }
    return 1;

Si pe mine ma enerveaza,ca atunci cand dau /v,imi apare astea...Localizeaza,Respawneaza,Informatii..Si ex,dau pe respawneaza,si-mi apare toate masinile personale..eu nu vreau asa..eu as vrea,cand dau /v sa-mi apara masinile personale,si sa dau pe ele si sa-mi apara Localizeaza,informatii si Respawneaza..etc..Ma puteti ajuta si pe mine? Dau +1,va rog

Link to comment
Share on other sites

Pai tu acolo ai pus ca atunci cand folosesti comanda /v sa acceseze comanda /vehicles, sterge 

CMD:v(playerid, params[]) {
    return cmd_vehicles(playerid, params);
}

si sa inteleg ca /vehswitch e acel /v care il vrei tu? Daca nu rescrie comanda /v dupa cum zici tu acolo ca vrei.

Link to comment
Share on other sites

Acum 7 minute, andy47 a spus:

Pai tu acolo ai pus ca atunci cand folosesti comanda /v sa acceseze comanda /vehicles, sterge 


CMD:v(playerid, params[]) {
    return cmd_vehicles(playerid, params);
}

si sa inteleg ca /vehswitch e acel /v care il vrei tu? Daca nu rescrie comanda /v dupa cum zici tu acolo ca vrei.

Bai frate,eu vreau...ai vazut cum e pe b-zone..un ex.. asa as vrea..adica scriu /v sau /vehicle,si imi da un tabel,dar la mine pe gm,imi da mai intai spawn,localizeaza,informatii.. si daca dau pe spawn,imi arata masinile personale..eu as vrea,sa scru /v sau /vehicle,si sa-mi dea mai intai masinile personale..ex: Infernus.. apas pe infernus,si sa-mi apara Spawn,Localizeaza,Informatii..

Link to comment
Share on other sites

Acum 10 ore, H3AtonN a spus:

da frate,nu prea le am.. sunt si eu la inceput..dasta am postat aici,poate are timp cineva,sa mi-o faca el,ca eu cred,ca pt cineva care se pricepe,o face in maxim 10min..

Ai toata noaptea la dispozitie :)) pe mine nu prea ma ajutat nimeni, incerci, stergi , te documentezi. Bafta!

Edited by andy47
Link to comment
Share on other sites

E un sistem greu pentru un incepator. Ai nevoie de multe variabile care sa salveze datele vehiculelor. Functii care sa salveze datele vehiculelor in baza de date, functii care sa incarce vehiculele din baza de date, tabel in baza de date, dialoguri, si multe loop-uri.

Uite un exeplu de loop care il folosesc eu in comanda /vehicles :

 

for(new y = 0; y < MAX_PERSONAL_VEHICLES; y++)

	    {

	        if(VehicleInfo[y][vID] == 0) continue;

	        if(VehicleInfo[y][vSpawned] == -1) continue;

	        if(!strcmp(VehicleInfo[y][vOwner], PlayerInfo[playerid][pUsername], false))

	        {


 

Edited by Jamal Alin

Cea mai sigura sursa de facut bani de buzunar in mediul virtual. Inregistreaza-te si pune-te pe treaba !!!

http://www.viespar.ro/?reff=ab8e9d8086304d6136eac03c710238d7

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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