PDA

View Full Version : Vratašca


morovicborna
22/05/2010, 12:01 PM
e ovako imam problem i neznam kako da ga rijesim ...imam ja jos vrata ali ova neznam prije mi je prijatelj pomogo al opet mi nece ...
e ovo stavim na pocetak
new opengate2;
new Float:x2_close;
new Float:y2_close;
new Float:z2_close;
new Float:x2_open;
new Float:y2_open;
new Float:z2_open;
new GateStatus3 = 0;

i onda odem tamo di umecem stvari i napravim ovo
opengate2 = CreateObject(976, 952.34136962891, -1277.595703125, 14.385063171387, 0, 0, 85.3544921875);
//closegate2 = CreateObject(976, 952.34204101563, -1286.7080078125, 13.71928024292, 0, 0, 85.352783203125);
x2_close = 952.34204101563;
y2_close = -1286.7080078125;
zy_close = 13.71928024292;
x2_open = 952.34136962891;
y2_open = -1277.595703125;
z2_open = 14.385063171387;

i odem jos malo dolje i
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(heal,4,cmdtext);
dcmd(gate,4,cmdtext);
dcmd(gate2,5,cmdtext);
dcmd(gate3,6,cmdtext);<--taj tu sam umetnuo ovi prijašnji su od prošlih vrata nerazumijem ovaj broj 6 ?? -.-
dcmd(weapons,7,cmdtext);
return 1;
}

ok i odem malo odlje jos da napisem kada se otvara i zatvara
dcmd_gate3(playerid,params[])
{
#pragma unused params
SendClientMessage(playerid,yellow,"Pricekajte da se vrata otvore/zatvore.");
if (GateStatus3 == 0)
{
MoveObject(opengate,x2_open,y2_open,z2_open,1.5000 );
GateStatus3 == 1;
}
else
{
MoveObject(opengate,x2_close,y2_close,z2_close,1.5 000);
GateStatus3 = 0;
}
return true;
}

Correlli
22/05/2010, 12:11 PM
Ostalu kodu nisam pogledao ali problem kod ovoga ti je da gate3 ima 5 simbola a ne 6.
dcmd(gate3,6,cmdtext);
g = 1
a = 2
t = 3
e = 4
3 = 5

Pravilno:
dcmd(gate3, 5, cmdtext);

morovicborna
22/05/2010, 12:15 PM
ahaaa to je zato uredu a vidi errora hahahah
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 0) : error 017: undefined symbol "opengate2"
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 2) : error 017: undefined symbol "x2_close"
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 2) : warning 215: expression has no effect
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 3) : error 017: undefined symbol "y2_close"
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 3) : warning 215: expression has no effect
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 4) : error 017: undefined symbol "zy_close"
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 4) : warning 215: expression has no effect
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 5) : error 017: undefined symbol "x2_open"
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 5) : warning 215: expression has no effect
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 6) : error 017: undefined symbol "y2_open"
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 6) : warning 215: expression has no effect
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 7) : error 017: undefined symbol "z2_open"
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(19 7) : warning 215: expression has no effect
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(31 3) : error 017: undefined symbol "GateStatus3"
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(31 5) : error 017: undefined symbol "x2_open"
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(31 6) : error 017: undefined symbol "GateStatus3"
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(31 6) : warning 215: expression has no effect
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(32 0) : error 017: undefined symbol "x2_close"
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(32 1) : error 017: undefined symbol "GateStatus3"
C:\Users\borna\Desktop\pawno\gamemodes\game.pwn(32 1) : warning 215: expression has no effect
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

Correlli
22/05/2010, 12:19 PM
Jesu li svi ti varijablovi globalni? I da nisi možda zaboravio koju zagradu?

morovicborna
22/05/2010, 12:20 PM
Jesu li svi ti varijablovi globalni? I da nisi možda zaboravio koju zagradu?


pa eo kopiro sam ti sve ...neznam gledo sam prijašnja vrata da ti ih kopiram

DarkPower
22/05/2010, 12:58 PM
Jesu li svi ti varijablovi globalni? I da nisi možda zaboravio koju zagradu?


pa eo kopiro sam ti sve ...neznam gledo sam prijašnja vrata da ti ih kopiram
Ti si samo dao lineove od koda, ali nisi bas CJELI nisi dao da vidimo jesi gdje fulao { ili }

morovicborna
26/05/2010, 06:10 PM
vidim da niko nije primjetio ovo
zy_close = 13.71928024292;

a treba biti
z2_close = 13.71928024292;