Jump to content

[REZOLVAT] Problema comanda Bullhorn


MasterGuN
 Share

Recommended Posts

Am creat comanda Bullhorn , sa imi ataseze de masina niste coarne . Dar nu apar . 

 

YCMD:bullhorn(playerid, params[], help) {
    if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_GREY, "Nu esti in vehiculul tau.");
    if(PersonalCar(playerid) == -1) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu esti in unul dintre vehiculele tale personale!");
    if(GetPlayerState(playerid) != 2) return SCM(playerid, COLOR_LGREEN, "* Trebuie sa fii la volan pentru a putea folosi aceasta comanda!");
    if(PlayerInfo[playerid][pVip] == 1) return 1;
    if(!IsPlayerInAnyVehicle(playerid)) return 1;
    if(InRaceArena[playerid] == 1 && PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_LGREEN, "Nu ai voie sa folosesti aceasta comanda atata timp cat esti in arena de curse!");
    new vehicleid = GetPlayerVehicleID(playerid);
    new object1 = CreateObject(19314, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    new object2 = CreateObject(19314, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(object1, vehicleid, 206.44, 1767.66, 17.38,0.000000,0.000000,0.000000);
    AttachObjectToVehicle(object2, vehicleid, 206.44, 1767.66, 17.38,0.000000,0.000000,0.000000);
    SCM(playerid, COLOR_YELLOW, "Comanda executata cu succes.");
    return 1;
}

Link to comment
Share on other sites

Ai verificat coordonatele offset in momentul atasarii obiectului? Cel mai probabil nu le-ai pus bine.

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

Coordonatele atasari le-am pus cu mapeditor

Acele coordonate nu sunt la fel cu cele offset. Coordonatele cerute in functia AttachObjectToVehicle sunt diferite de cele din map editor.

 

Ai aici un tutorial: http://forum.sa-mp.com/showthread.php?t=237412    (aceeasi teorie este si pentru vehicule)

 

EDIT: Ai aici si o aplicatie prin care poti lua coordonatele offset mai usor: http://forum.sa-mp.com/showthread.php?t=554805

Edited by iMatt

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

Acele coordonate nu sunt la fel cu cele offset. Coordonatele cerute in functia AttachObjectToVehicle sunt diferite de cele din map editor.

 

Ai aici un tutorial: http://forum.sa-mp.com/showthread.php?t=237412    (aceeasi teorie este si pentru vehicule)

 

EDIT: Ai aici si o aplicatie prin care poti lua coordonatele offset mai usor: http://forum.sa-mp.com/showthread.php?t=554805

Nu am reusit  , iti multumesc oricum 

Link to comment
Share on other sites

YCMD:bullhorn(playerid, params[], help) {
    if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_GREY, "Nu esti intr-un vehicul.");
    if(PersonalCar(playerid) == -1) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu esti in unul dintre vehiculele tale personale!");
    if(GetPlayerState(playerid) != 2) return SCM(playerid, COLOR_LGREEN, "* Trebuie sa fii la volan pentru a putea folosi aceasta comanda!");
    if(InRaceArena[playerid] == 1 && PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_LGREEN, "Nu ai voie sa folosesti aceasta comanda atata timp cat esti in arena de curse!");
    new vehicleid = GetPlayerVehicleID(playerid);
    new object1 = CreateObject(19314, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    new object2 = CreateObject(19314, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(object1, vehicleid, 206.44, 1767.66, 17.38,0.000000,0.000000,0.000000);
    AttachObjectToVehicle(object2, vehicleid, 206.44, 1767.66, 17.38,0.000000,0.000000,0.000000);
    SCM(playerid, COLOR_YELLOW, "Comanda executata cu succes.");
    return 1;
}

ar trebui sa mearga acum, cred

Link to comment
Share on other sites

YCMD:bullhorn(playerid, params[], help) {
    if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_GREY, "Nu esti intr-un vehicul.");
    if(PersonalCar(playerid) == -1) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu esti in unul dintre vehiculele tale personale!");
    if(GetPlayerState(playerid) != 2) return SCM(playerid, COLOR_LGREEN, "* Trebuie sa fii la volan pentru a putea folosi aceasta comanda!");
    if(InRaceArena[playerid] == 1 && PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_LGREEN, "Nu ai voie sa folosesti aceasta comanda atata timp cat esti in arena de curse!");
    new vehicleid = GetPlayerVehicleID(playerid);
    new object1 = CreateObject(19314, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    new object2 = CreateObject(19314, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(object1, vehicleid, 206.44, 1767.66, 17.38,0.000000,0.000000,0.000000);
    AttachObjectToVehicle(object2, vehicleid, 206.44, 1767.66, 17.38,0.000000,0.000000,0.000000);
    SCM(playerid, COLOR_YELLOW, "Comanda executata cu succes.");
    return 1;
}

ar trebui sa mearga acum, cred

 

Nu poti folosi coordonatele hartii ca sa atasezi obiecte de masina.

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

Nu poti folosi coordonatele hartii ca sa atasezi obiecte de masina.

ele sunt create cu CreateObject la coord 0,0,0, si dupa sunt atasate pe masina la coordonatele alea

eu nu am modificat nimic la createobject si attachobject doar am scos doua returnuri

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...