Jump to content
  • 0

Problema porti


Madalin1607

Question

Problema intalnita (descriere): pai am facut porti in zona aia  din imagini si doar la factiunea 1 si 2 se deschid dar cand se deschid se deschid stramb si nu stiu cum sa fac sa ramana tot la 270 grade 
Ero(area / rile) / warning-(ul / urile): nici unul 
Liniile de cod / sursa / script-ul(obligatoriu): pas 1

forward pdgateclose2();
forward pdgateclose3();
pas 2

new pdgate2;
new pdgate3;
pas 3

public pdgateclose2()
{
MoveDynamicObject(pdgate2,1546.8000000,-1625.6000000,13.6000000,4.0);
}
public pdgateclose3()
{
MoveDynamicObject(pdgate3,1546.8000000,-1631.1000000,13.6000000,4.0);
}
pas 4
 pdgate2 = CreateDynamicObject(988,1546.8000000,-1625.6000000,13.6000000,0.0000000,0.0000000,270.0000000); //object(ws_apgate) (1)
 pdgate3 = CreateDynamicObject(988,1546.8000000,-1631.1000000,13.6000000,0.0000000,0.0000000,270.0000000); //object(ws_apgate) (4)
pas 5

 if(PlayerToPoint(15.0,i,1546.8000000,-1625.6000000,13.6000000))
{
 if(PlayerInfo[pMember] == 1 || PlayerInfo[pLeader] == 1 || PlayerInfo[pMember] == 2 || PlayerInfo[pLeader] == 2 )
 {
 MoveDynamicObject(pdgate2,1546.8000000,-1620.3000000,13.6000000,4.0);
SetTimerEx("pdgateclose2",5000,false,"d",i);
}
}
if(PlayerToPoint(15.0,i,1546.8000000,-1631.1000000,13.6000000))
{
 if(PlayerInfo[pMember] == 1 || PlayerInfo[pLeader] == 1 || PlayerInfo[pMember] == 2 || PlayerInfo[pLeader] == 2 )
 {
 MoveDynamicObject(pdgate3,1546.8000000,-1635.6000000,13.6000000,4.0);
SetTimerEx("pdgateclose3",5000,false,"d",i);
}
}

Imagini / Video (optional): si cam asa reactioneaza portile 

Ati incercat sa rezolvati singur?: da si nu am facut mai nimic

am vazut o chestie cu rotatia dar nu stiu cum sa o bag si sa o implementez daca o puteti face direct astfel incat sa inteleg ce a iesit de acolo ....

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

eu stiu ca aia e viteza de deplasare a portilor si nu vreau sa ramana pe loc degeaba 

ce ai zis tu=0 ele decat se intorc la rotatia initiala de 0grade si raman asa deschise

 

 

deci portile in timp ce se deschid raman se schimba la rotatia de 0 grade in loc sa parcurga acel drum in pozitia de 270 grade cum sunt puse din script 

mie imi trebuie ceva de genu si nu stiu cum sa il pun acolo ca sa mearga 

 

CMD:gate(playerid, params[])
{
    if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1) {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, 1544.6, -1630.8, 13.0)) switch(LSPDGates[0][1]) {
            case 0: {
                SetDynamicObjectRot(LSPDGates[0][0],0.0, 0, 90.0);
                LSPDGates[0][1] = 1;
            }
            case 1: {
                SetDynamicObjectRot(LSPDGates[0][0],0.0, 90.0, 90.0);
                LSPDGates[0][1] = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 15.0, 1589.19995117,-1637.98498535,14.69999981)) switch (LSPDGates[1][1]) {
            case 0: {
                MoveDynamicObject(LSPDGates[1][0] ,1589.19995117,-1637.98498535,9.69999981, 1.0);
                LSPDGates[1][1] = 1;
                PlayerPlaySoundEx(1035, 1589.19995117,-1637.98498535,14.69999981);
            }
            case 1: {
                MoveDynamicObject(LSPDGates[1][0],1589.19995117,-1637.98498535,14.69999981, 1.0);
                LSPDGates[1][1] = 0;
                PlayerPlaySoundEx(1035, 1589.19995117,-1637.98498535,14.69999981);
            }
        }
    }
    return 1;
}

 

si schimbate coordonatele si toate cele + in loc de lspdgate pdgate2 . ca nu stiu cum sa bag chestia asta sa imi ramana portile asa la 270 adica daca stie cineva sa imi rezolve treaba asta 

 

daca ma poate ajuta cineva raman dator 

Edited by Madalin1607
Link to comment
Share on other sites

  • 0

MoveDynamicObject(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rx = -1000.0, Float:ry = -1000.0, Float:rz = -1000.0);

 

 

MoveDynamicObject(pdgate2,1546.8000000,-1625.6000000,13.6000000,4.0,0.0000000,0.0000000,270.0000000);

pdgate2 = CreateDynamicObject(988,1546.8000000,-1625.6000000,13.6000000,0.0000000,0.0000000,270.0000000); //object(ws_apgate) (1)

rpg.reality-gaming.ro

Link to comment
Share on other sites

  • 0

MoveDynamicObject(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rx = -1000.0, Float:ry = -1000.0, Float:rz = -1000.0);

 

 

MoveDynamicObject(pdgate2,1546.8000000,-1625.6000000,13.6000000,4.0,0.0000000,0.0000000,270.0000000);

pdgate2 = CreateDynamicObject(988,1546.8000000,-1625.6000000,13.6000000,0.0000000,0.0000000,270.0000000); //object(ws_apgate) (1)

uite rezultatul :)))

 

http://postimg.org/image/z4pgu1fr3/

Link to comment
Share on other sites

  • 0

e fara /gateopen sau altcv doar atat se deschid doar cand " vede " membri/lideri factiuni 1 si 2 atat 

 

si tot ce e pus acolo prin pas 1 -5 aia e tot  ce contin portile de la 0 pana la final 

 

 

si ma intereseaza sa ramana tot asa cand "vede" membri/lideri factiunilor 1 si 2 sa se deschida nu vreau cu comanda ....

dar nu vreau sa se mai roteasca aiurea sa ramana normala in pozitia ei sa se deplaseze cea din dreapta in dreapta si innapoi la locul ei lafel si cea din stanga  sa se duca in stanga si sa revina in locul initial fara sa ramana in alta rotatie si toate visele

 

 

 

daca ma poate ajuta cineva sa o fac de la 0 sau sa imi explice ce mai pot adauga astfel incat sa nu mai faca asa ?

multumesc anticipat

Edited by Madalin1607
Link to comment
Share on other sites

  • 0

imi da o eroare 

pawnoincludestreamer.inc(173) : error 017: undefined symbol "OBJECT_MATERIAL_SIZE_256x128"

 

 

si am mai gasit altu care imi da erorile si warningurile astea

pawnoincludestreamer.inc(166) : error 017: undefined symbol "OBJECT_MATERIAL_SIZE_256x128"
pawnoincludestreamer.inc(487) : warning 235: public function lacks forward declaration (symbol "OnPlayerWeaponShot")
pawnoincludestreamer.inc(487) : warning 219: local variable "hitid" shadows a variable at a preceding level
pawnoincludestreamer.inc(489) : error 017: undefined symbol "BULLET_HIT_TYPE_PLAYER_OBJECT"
GMJ4F.pwn(3790) : warning 209: function "Streamer_OnPlayerDisconnect" should return a value
 
 
 
Am rezolvat :D nu mai este nevoie am ascultat sfatul tau nonamed iti multumesc :D 
Edited by Madalin1607
Link to comment
Share on other sites

  • 0

 

imi da o eroare 

pawnoincludestreamer.inc(173) : error 017: undefined symbol "OBJECT_MATERIAL_SIZE_256x128"

 

 

si am mai gasit altu care imi da erorile si warningurile astea

pawnoincludestreamer.inc(166) : error 017: undefined symbol "OBJECT_MATERIAL_SIZE_256x128"
pawnoincludestreamer.inc(487) : warning 235: public function lacks forward declaration (symbol "OnPlayerWeaponShot")
pawnoincludestreamer.inc(487) : warning 219: local variable "hitid" shadows a variable at a preceding level
pawnoincludestreamer.inc(489) : error 017: undefined symbol "BULLET_HIT_TYPE_PLAYER_OBJECT"
GMJ4F.pwn(3790) : warning 209: function "Streamer_OnPlayerDisconnect" should return a value
 
 
 
Am rezolvat :D nu mai este nevoie am ascultat sfatul tau nonamed iti multumesc :D

 

 

Cu multa placere . Topic Closed !

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.