Jump to content

Question

Posted

 

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;
}

7 answers to this question

Recommended Posts

  • 0
Posted

salut, 

AttachObjectToVehicle(object1, vehicleid, 206.44, 1767.66, 17.38,0.000000,0.000000,0.000000);

coordonatele tale sunt mult prea mari nu stiu de unde ai luat tu aceste valori 206.44, 1767.66, 17.38,

intra in map editor creaza o masina la coordonatele 0 0 0 x y si z si acolo creezi obiectele atasate pe masina si acelea sunt coordonatele de care ai nevoie

 

Mutat la categoria corespunzatoare data viitoare ai grija unde postezi

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
  • 0
Posted
1 minute ago, Mister said:


    salut

AttachObjectToVehicle(object1, vehicleid, 206.44, 1767.66, 17.38,0.000000,0.000000,0.000000);

coordonatele tale sunt mult prea mari nu stiu de unde ai luat tu aceste valori 206.44, 1767.66, 17.38,

intra in map editor creaza o masina la coordonatele 0 0 0 x y si z si acolo creezi obiectele atasate pe masina si acelea sunt coordonatele de care ai nevoie

Coordonatele le*am luat cu map editor

 

  • 0
Posted
3 minutes ago, Adrian FW said:

Coordonatele le*am luat cu map editor

 

iar eu iti spun ca nu sunt bune,206.44, 1767.66, 17.38

206 inseamna ca e la 206 distanta x fata de vehicul, 1767 inseamna ca este la 1767 de metri distanta fata de vehicul si z la fel deci faci cum ti  am spus eu va merge, refa coorodnatele in map editor cu o masina la coordonatele 0 0 0 si obiectele atasate le pui pe ea si de acolo iei coordonatele

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
  • 0
Posted
9 minutes ago, Mister said:

iar eu iti spun ca nu sunt bune,206.44, 1767.66, 17.38

206 inseamna ca e la 206 distanta x fata de vehicul, 1767 inseamna ca este la 1767 de metri distanta fata de vehicul si z la fel deci fa cum ti  am spus eu refa coorodnatele in map editor cu o masina la coordonatele 0 0 0 si obiectele atasate le pui pe ea si de acolo iei coordonatele

https://imgur.com/a/K1jvXU9 - La fel

  • 0
Posted
23 minutes ago, Mister said:

nu ai facut nimic, in dreapta acolo scrie 0 0 0 la coordonatele x y z? nu, scrie -77 2067 si  16.9

Nush frate , nu ma prea pricep . Mersi oricum 

  • 0
Posted (edited)
Acum 1 oră, Adrian FW a spus:

Nush frate , nu ma prea pricep . Mersi oricum 

Trebuiesc niste coordonate offset.practic indepartezi obiectele de masina cu cat ai tu pus pe x,y,z.

Iti dau ca exemplu yrmatoarele comezi pt a aseza pe masina textul vip in functie de masina. coordonatele difera de la masina la masina deoarece au forme diferite

CMD:xpos(playerid, params[]) {
	if(sscanf(params, "f", VipPos[0])) return 1;
	DestroyDynamicObject(VipText);
	VipText = CreateDynamicObject(1463, -2597.0762, -2638.4270, -5.3536, -87.6999, 90.4001, -87.1805);
	AttachDynamicObjectToVehicle(VipText, GetPlayerVehicleID(playerid), VipPos[0], VipPos[1], VipPos[2], 0.0, 0.0, 0.0);
	return 1;
}

CMD:ypos(playerid, params[]) {
	if(sscanf(params, "f", VipPos[1])) return 1;
	DestroyDynamicObject(VipText);
	VipText = CreateDynamicObject(1463, -2597.0762, -2638.4270, -5.3536, -87.6999, 90.4001, -87.1805);
	AttachDynamicObjectToVehicle(VipText, GetPlayerVehicleID(playerid), VipPos[0], VipPos[1], VipPos[2], 0.0, 0.0, 0.0);
	return 1;
}

CMD:zpos(playerid, params[]) {
	if(sscanf(params, "f", VipPos[2])) return 1;
	DestroyDynamicObject(VipText);
	VipText = CreateDynamicObject(1463, -2597.0762, -2638.4270, -5.3536, -87.6999, 90.4001, -87.1805);
	AttachDynamicObjectToVehicle(VipText, GetPlayerVehicleID(playerid), VipPos[0], VipPos[1], VipPos[2], 0.0, 0.0, 0.0);
	return 1;
}

 

Edited by valivaly96

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.