[TuT] Otvaranje kapija 0.3d

Započeo Lucic | Digital Hosting, Decembar 20, 2011, 21:52:16 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Kao prvo pozdrav. Posto vidim da dosta igraca ima dilemu kada su presli na 0.3d verziju sto im kapije koje su normalno radile na 0.3c sada se rotiraju itd. Evo sada cu vam pokazati u cemu je caka u svom prvom tutorijalu. Pa da pocnemo.

-Na vrhu moda gdje vam se nalaze svi "New" dodajte ovaj code:
new kapija;
Sa ovom funkcijom definisete naziv svoje kapije.

-Zatim kada ste dodali objekat u svoj mod (objekat kapije) code bi trebao da izgleda ovako:
CreateObject(980, 2441.199951, -1658.800048, 15.100000, 0.000000, 0.000000, 90.027465);
(ovo sam lupo kordinate objekata), ali posto pravimo  objekat koji treba da se pomjera, code mora da izgleda ovako:
kapija = CreateObject(980, 2441.199951, -1658.800048, 15.100000, 0.000000, 0.000000, 90.027465);
Ovo kapija = to znaci da se radi o objektu koji smo definisali na vrhu (new kapija;)

-Sada slijedi malo tezi posao. Treba da napravimo komandu sa kojom ce se otvarati ta nasa kapija. Komanda bi trebala da izgleda ovako:
if(!strcmp(cmdtext, "/otvori", true))
{
    MoveObject(kapija,309.799987, -1554.099975, 37.799999, 0.8 ,0 ,0 ,90.027465);
    SetTimer("zkapija", 12000, 0);
    return 1;
}

Sada da objasnim u cemu je fora na 0.3d. Ova zadnja 3 broja iza brzine ,0 ,0 ,322); Ta zadnja 3 broja ozacavaju ROTACIJU objekta. Posto kod vecine ova zadnja 3 broja budu nule tj ovako izgledaju 0,0,0); OBJEKAT SE ROTIRA. Da bi to sprijecili u ovu funkciju u komandi MoveObject, Zadnja 3 broja iz ovog koda kapija = CreateObject(980, 2441.199951, -1658.800048, 15.100000, 0.000000, 0.000000, 90.027465); tj. preciznije ove brojeve 0.000000, 0.000000, 90.027465); stavljate u MoveObject iza brzine. Ako vam ti brojevi budu isti u MoveObject i u CreateObject poklapaju, onda nece biti problema tj nece vam se rotirati kapija nego pravilno rotirati.

Da se vratim na objasnjavanje funkcija u komandi. MoveObject vam je funkcija za pomjeranje objekata. U nju stavljate kordinate objekta na koju hocete da se objekat pomjeri. (kapija, znaci koji objekat se pomjera, a posto smo definisali na vrhu new kapija; onda i u MoveObject funkciji mora biti taj naziv tj ID objekta.

309.799987, -1554.099975, 37.799999 ovi brojevi predstavljaju kordinate koje objekat treba da postigne kucanjem komande.

, 0.8 je brzina kojom ce se objekat pomicati.

,0 ,0 ,90.027465 a ta 3 zadnja broja predstavljaju rotaciju kao sto smo vec rekli.

SetTimer("zkapija", 12000, 0); Ovom funkcijom porecemo timer. "zkapija" tu stavljate ime callibacka sa kojim hocete da zatvorite objekat tj kapiju. 12000 predstavlja vrijeme za koje ce se kapija zatvoriti od vremena otvaranja, a ova 0 pravo da kazem i nzm sta znaci xD.

-Kada smo napravili komandu moramo i calliback sa kojim zatvaramo kapiju. Na vrh moda gdje Vam se nalaze svi forwardi dodajte ovakav forward:
forward zkapija; Forward mora tako da se zove jer smo u ga u timeru tako nazvali.
Sada na dno moda dodajte ovakav calliback:
public zkapiju()
{
    MoveObject(kapija,2441.199951, -1658.800048, 15.100000, 0.8 ,0 ,0 ,90.027465);
    return 1;
}

Ovdje sve ima isto znacenj kao funkcija MoveObject u komandi za otvaranje kapije. Ako hocete da Vam se kapija na zatvaranju vrati na istu poziciju kao prije otvaranja onda modate da stavite iste kordinate kao u ovoj funkciju:
kapija = CreateObject(980, 2441.199951, -1658.800048, 15.100000, 0.000000, 0.000000, 90.027465);
-Ali ne zaboravite da stavite iste pozije x,y,z kordinata brzinu zatvaranja!
I naravno zadnja 3 broja morate staviti ista kao u CreateObject funkciji da Vam se objekat ne rotira. I to je to :D[/b]

I na kraju price objasnio sam vam kako napraviti pomicne kapije sa zatvaranjem ali i novu funkciju. Na kraju price stvar je bila u zadnja 3 broja tj rotaciji u funkcijama CreateObject i MoveObject. Od sada Vam je lakse praviti rampe tj mozete ih praviti sa jednom funkcijom nego kao prije sto ste trebali 2 coda tj :
SetObjectPos(ID, 1218.4964599609, -923.35882568359, 42.84375);
         SetObjectRot(ID, 0, 0, 12); //Kordinati OTVORENE kapije
[/color][/size]

Ako koristite Streamer morate da skinete novi Streamer za 0.3d funkcije da Vam nebi bacalo errore kada dodate rotaciju na kraj funkcija i naravno umjesto CreateObject i MoveObject stavljate funkcije CreateDynamicObject i MoveDynamicObject. Taj Streamer mozete da skinete sa ovog linka: http://www.2shared.com/file/WCNvvXnv/streamer_plugin_v2_6_r26.html
Poslednja Izmena: April 17, 2012, 14:28:41 POSLE PODNE od joXy_


e,ovo ce zasgurno pomoc vecini, predlazem da stavite sticky

Kad downloadam pise da je nepoznatom formatu  ili je ostecena
btw kolko sam shvatio,samo treba ta zadnja 3 broja promjeniot?

Evo da neko napise tut ....Sada nece vise otvarati teme vezane za 0.3d (bar se nadam),svaka cast !

dobro objasnjeno sve pet  :)
samo STRCMP nisi trebo koristit
al nea veze tut odlican

Ovako ja sam skinuo samo novi streamer i sve kapije mi normalno Rade


ja namjestim normalno sve kako je u tebe i neradi moze li biti da je da trebam novi streamer jer ovaj koji si ti stavio nisam stavljao jermi nesto neradi na modu ?

ja sam skinuo novi streamer i prebacio ono moveobject u movedynamicobject, i jos nesto i radi mi odlicno

ja kad ubacim novi streamer i compilam ovo mi izbaci:

C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(79) : error 021: symbol already defined: "Streamer_TickRate"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(80) : error 021: symbol already defined: "Streamer_MaxItems"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(81) : error 021: symbol already defined: "Streamer_VisibleItems"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(82) : error 021: symbol already defined: "Streamer_CellDistance"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(83) : error 021: symbol already defined: "Streamer_CellSize"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(87) : error 021: symbol already defined: "Streamer_Update"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(88) : error 021: symbol already defined: "Streamer_UpdateEx"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(89) : error 021: symbol already defined: "Streamer_ToggleIdleUpdate"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(93) : error 021: symbol already defined: "Streamer_GetFloatData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(94) : error 021: symbol already defined: "Streamer_SetFloatData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(95) : error 021: symbol already defined: "Streamer_GetIntData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(96) : error 021: symbol already defined: "Streamer_SetIntData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(97) : error 021: symbol already defined: "Streamer_IsInArrayData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(98) : error 021: symbol already defined: "Streamer_AppendArrayData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(99) : error 021: symbol already defined: "Streamer_RemoveArrayData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(100) : error 021: symbol already defined: "Streamer_GetUpperBound"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(104) : error 021: symbol already defined: "Streamer_IsItemVisible"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(105) : error 021: symbol already defined: "Streamer_DestroyAllVisibleItems"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(106) : error 021: symbol already defined: "Streamer_CountVisibleItems"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(110) : error 021: symbol already defined: "CreateDynamicObject"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(111) : error 021: symbol already defined: "DestroyDynamicObject"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(112) : error 021: symbol already defined: "IsValidDynamicObject"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(113) : error 021: symbol already defined: "SetDynamicObjectPos"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(114) : error 021: symbol already defined: "GetDynamicObjectPos"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(115) : error 021: symbol already defined: "SetDynamicObjectRot"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(116) : error 021: symbol already defined: "GetDynamicObjectRot"

Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase

Citat: ivica 156 poslato Decembar 31, 2011, 22:40:44 POSLE PODNE
ja kad ubacim novi streamer i compilam ovo mi izbaci:

C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(79) : error 021: symbol already defined: "Streamer_TickRate"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(80) : error 021: symbol already defined: "Streamer_MaxItems"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(81) : error 021: symbol already defined: "Streamer_VisibleItems"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(82) : error 021: symbol already defined: "Streamer_CellDistance"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(83) : error 021: symbol already defined: "Streamer_CellSize"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(87) : error 021: symbol already defined: "Streamer_Update"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(88) : error 021: symbol already defined: "Streamer_UpdateEx"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(89) : error 021: symbol already defined: "Streamer_ToggleIdleUpdate"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(93) : error 021: symbol already defined: "Streamer_GetFloatData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(94) : error 021: symbol already defined: "Streamer_SetFloatData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(95) : error 021: symbol already defined: "Streamer_GetIntData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(96) : error 021: symbol already defined: "Streamer_SetIntData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(97) : error 021: symbol already defined: "Streamer_IsInArrayData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(98) : error 021: symbol already defined: "Streamer_AppendArrayData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(99) : error 021: symbol already defined: "Streamer_RemoveArrayData"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(100) : error 021: symbol already defined: "Streamer_GetUpperBound"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(104) : error 021: symbol already defined: "Streamer_IsItemVisible"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(105) : error 021: symbol already defined: "Streamer_DestroyAllVisibleItems"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(106) : error 021: symbol already defined: "Streamer_CountVisibleItems"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(110) : error 021: symbol already defined: "CreateDynamicObject"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(111) : error 021: symbol already defined: "DestroyDynamicObject"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(112) : error 021: symbol already defined: "IsValidDynamicObject"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(113) : error 021: symbol already defined: "SetDynamicObjectPos"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(114) : error 021: symbol already defined: "GetDynamicObjectPos"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(115) : error 021: symbol already defined: "SetDynamicObjectRot"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\pawno\include\streamer.inc(116) : error 021: symbol already defined: "GetDynamicObjectRot"

Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


ama brate ne trenaš da kompila streamer, nego game mod da ti učita novi stramer -.-
Kada muškarac priča ženi bezobrazne stvari, to je seksualno uznemiravanje…
A kada žena to radi muškarcu to je 2 eura+PDV po minuti. :D

pa ubacio sam taj streamer i sve i isao compilat mod i to mi doslo

Vjerojatno si 2 put definirao streamer.
                 
"I'm a loser and a user so I don't need no accuser" - Billie Joe Armstrong

Ljudi meni opet niÅ¡ta skinio sam streamer najnoviji ubacio  GM compilo sve normalno,neÅ¡ta sam podeÅ¡avao tamo na onome MoveDynamic ali opet niÅ¡ta opet se rotiraju...

ako mi neko moze bolje objasnit ovo za rotiranje isto tako se desava na onom Classic Life roleplay evo kako izgleda komanda za otvorit vrata,sta bi trebalo promjenit?


if (strcmp("/otvori", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) //
{
    if (PlayerToPoint(30, playerid,1643.0035400391, -1714.6795654297, 20.349878311157) || PlayerToPoint(30, playerid,1643, -1714.87890625, 15.124843597412))
{
           MoveDynamicObject(fbiograda,1642.9166259766, -1710.2252197266, 20.349878311157, 2.00);
           MoveDynamicObject(fbiograda2,1642.9548339844, -1710.2493896484, 15.124843597412, 2.00);
       SetTimer("fbizatvori", 5000, 0);
       SendClientMessage(playerid, WHITE, "("COL_ORANGE"Kapija{FFFFFF}!) Otvorio si kapiju, "COL_ORANGE"automatski {FFFFFF}ce se zatvorit!");
       GetPlayerName(playerid, sendername, sizeof(sendername));
       format(string, sizeof(string), "%s uzima daljinski i otvara kapiju.", sendername);
           ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena..."); }
}

To je samo jedan dio ako bi mogli tu da objasnite kako da popravim pa cu ja ostalo,Hvala
Ako mozete uci ovde http://suvajacss.deviantart.com/art/Y-U-No-Eat-My-Spine-284280317  i kliknuti sa desne strane "I'd wear this" i "add to favourites" (trebate se prvo registrovati) treba sestri za takmicenje....:)

Citat: Just Say OmG poslato Januar 04, 2012, 21:46:31 POSLE PODNE
ako mi neko moze bolje objasnit ovo za rotiranje isto tako se desava na onom Classic Life roleplay evo kako izgleda komanda za otvorit vrata,sta bi trebalo promjenit?


if (strcmp("/otvori", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) //
{
    if (PlayerToPoint(30, playerid,1643.0035400391, -1714.6795654297, 20.349878311157) || PlayerToPoint(30, playerid,1643, -1714.87890625, 15.124843597412))
{
           MoveDynamicObject(fbiograda,1642.9166259766, -1710.2252197266, 20.349878311157, 2.00);
           MoveDynamicObject(fbiograda2,1642.9548339844, -1710.2493896484, 15.124843597412, 2.00);
       SetTimer("fbizatvori", 5000, 0);
       SendClientMessage(playerid, WHITE, "("COL_ORANGE"Kapija{FFFFFF}!) Otvorio si kapiju, "COL_ORANGE"automatski {FFFFFF}ce se zatvorit!");
       GetPlayerName(playerid, sendername, sizeof(sendername));
       format(string, sizeof(string), "%s uzima daljinski i otvara kapiju.", sendername);
           ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else { SendClientMessage(playerid, COLOR_GREY,"Destinacija je previse udaljena..."); }
}

To je samo jedan dio ako bi mogli tu da objasnite kako da popravim pa cu ja ostalo,Hvala

Isti problem imam, neko ima resenje ?!