2 gates open different ways???
#1

Ok i just finish my Army base who i will give you all but first i need to make gates sooo im done with this so there it is
PHP код:
CreateObject(986,1209.7000000,-1840.7000000,14.2000000,0.0000000,0.0000000,180.0000000); //object(gate_autol) (1)
CreateObject(985,1217.6000000,-1840.7000000,14.2000000,0.0000000,0.0000000,180.0000000); //object(gate_autor) (1) 
Ok soo i need help again... How to make "AutoR" gate move to right and "AutoL" gate move to Left
Reply
#2

Open your map editor once again, move both gates to the opening locations you desire & then save the objects and use the coordinates with MoveObject to make them move.
Reply
#3

(y) this will be my frist time will i make gates open different ways to now i make only to one way i just want to be sure is like to make like one gate
Reply
#4

Quote:
Originally Posted by Bulgaria
Посмотреть сообщение
(y) this will be my frist time will i make gates open different ways to now i make only to one way i just want to be sure is like to make like one gate
I am not really sure of what you're trying to say but I think the answer is yes, its the same as making one gate but the only difference is 2 objects in 2 different locations.
Reply
#5

Ok what now??
PHP код:
#if defined FILTERSCRIPT
new gateone;
new 
gatetwo
PHP код:
//Gates
    
gateone CreateObject(986,1209.7000000,-1840.7000000,14.2000000,0.0000000,0.0000000,180.0000000);
    
gatetwo CreateObject(985,1217.6000000,-1840.7000000,14.2000000,0.0000000,0.0000000,180.0000000);
    return 
1
PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp)cmdtext"/oag"true) == 0) {
    
MoveObject(gateone1205.7000000,-1840.7000000,14.20000001);
    
MoveObject(gateone1221.6000000,-1840.7000000,14.20000001);
    return 
1;
    }
    
    if(
strcmp)cmdtext"/cag"true) == 0) {
    
MoveObject(gateone1209.7000000,-1840.7000000,14.20000001);
    
MoveObject(gateone1217.6000000,-1840.7000000,14.20000001);
    return 
1;
    }
    return 
0;

Reply
#6

Change the "gateone" variable in both of these lines (2nd in each CMD) to "gatetwo" to make the 2nd gate move.

Код:
MoveObject(gateone, 1221.6000000,-1840.7000000,14.2000000, 1);
and
Код:
MoveObject(gateone, 1217.6000000,-1840.7000000,14.2000000, 1);
gateone -> gatetwo
Reply
#7

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp)cmdtext"/oag"true) == 0) {
    
MoveObject(gateone1205.7000000,-1840.7000000,14.20000001);
    
MoveObject(gatetwo1221.6000000,-1840.7000000,14.20000001);
    return 
1;
    }
    
    if(
strcmp)cmdtext"/cag"true) == 0) {
    
MoveObject(gateone1209.7000000,-1840.7000000,14.20000001);
    
MoveObject(gatetwo1217.6000000,-1840.7000000,14.20000001);
    return 
1;
    }
    return 
0;

PHP код:
C:\Users\Борисов\Desktop\BG RP Server\gamemodes\BG1.2.pwn(281) : error 017undefined symbol "gateone"
C:\Users\Борисов\Desktop\BG RP Server\gamemodes\BG1.2.pwn(282) : error 017undefined symbol "gatetwo"
C:\Users\Борисов\Desktop\BG RP Server\gamemodes\BG1.2.pwn(419) : error 076syntax error in the expression, or invalid function call
C
:\Users\Борисов\Desktop\BG RP Server\gamemodes\BG1.2.pwn(419) : warning 215expression has no effect
C
:\Users\Борисов\Desktop\BG RP Server\gamemodes\BG1.2.pwn(419) : warning 215expression has no effect
C
:\Users\Борисов\Desktop\BG RP Server\gamemodes\BG1.2.pwn(419) : warning 215expression has no effect
C
:\Users\Борисов\Desktop\BG RP Server\gamemodes\BG1.2.pwn(419) : error 001expected token";"but found ")"
C:\Users\Борисов\Desktop\BG RP Server\gamemodes\BG1.2.pwn(419) : error 029invalid expressionassumed zero
C
:\Users\Борисов\Desktop\BG RP Server\gamemodes\BG1.2.pwn(419) : fatal error 107too many error messages on one line

Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


6 Errors

Reply
#8

I recommend switching to a different command processor. However, your're using an incorrect strcmp syntax.

Код:
if(strcmp(cmdtext, "/oag", true) == 0)
is how the command should look.
Reply
#9

o yeah i see it ...
Reply
#10

pawn Код:
new gateone;
new gatetwo
Hope it get working Try add that in your script.pwn
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)