[Tutorial] Moving Gates, Elevators Etc.
#21

Bruzer look , i put ,

new gates; (in the variebles part)

CreateObject(980, 1316.275757, -2725.842773, 15.349422, 0.0000, 0.0000, 326.2500); ( in the objects par )

and put

if(strcmp(cmdtext, "/opengate", true) == 0) {
MoveObject(980, 1316.275757, -275.842773, 15.324396, 2.00);
return 1;
}
if(strcmp(cmdtext, "/closegate", true) == 0) {
MoveObject(1316.275757, -2725.842773, 15.349422, 2.00);
return 1;
}

in OnPlayerCommandText , THE /opengate DON'T SAY UNKNOWN COMMAND , JUST THE GATE DON'T OPEN, AND THE /closegate SAY UNKNOWN COMMAND , WHAT'S WRONG WITH THE SCRIPT ?
Reply
#22

gates = CreateObject(980, 1316.275757, -2725.842773, 15.349422, 0.0000, 0.0000, 326.2500);


if(strcmp(cmdtext, "/opengate", true) == 0) {
MoveObject(gates,1316.275757, -2725.842773, 15.349422);
return 1;
}
if(strcmp(cmdtext, "/closegate", true) == 0) {
MoveObject(gates,1316.275757, -2725.842773, 15.349422, 2.00);
return 1;
}

Put the gates = CreateObject(980, 1316.275757, -2725.842773, 15.349422, 0.0000, 0.0000, 326.2500); in the object Spot.
Reply
#23

It is in the Object Spot.
Reply
#24

Is gates = CreateObject(980, 1316.275757, -2725.842773, 15.349422, 0.0000, 0.0000, 326.2500); In the object part?

Use this also


Quote:

if(strcmp(cmdtext, "/opengate", true) == 0) {
MoveObject(gates,1316.275757, -2725.842773, 15.349422);
return 1;
}
if(strcmp(cmdtext, "/closegate", true) == 0) {
MoveObject(gates,1316.275757, -2725.842773, 15.349422, 2.00);
return 1;
}

Reply
#25

I copy your command that you said now, and it still the same , the /closegate Still Unkown command and /opengate don't do nothing .

One little question , in your command that you post now , the /opengate MoveObject is (objectid, Float:X, Float:Y, Float:Z) But where's the speed ? must be (objectid, Float:X, Float:Y, Float:Z, Float:Speed) is i correct ? you put the speed in /closegate MoveObject , why not put in the /opengate MoveObject speed ?
Reply
#26

2.00 Is the speed, At the end.

EDIT : And the /opengate (objectid) Is wrong, It has to be what the gate is called

Yours is called gates So put the /opengate

With MoveObject,gates,(etc etc etc etc)
Reply
#27

I'm so confused sorry for getting your time,

can you show me how it would be ?

write commands, and i test okay ? :/

SORRY , SORRY , SORRY
Reply
#28

ok you seem to know about gates i have a question i already have them gates in Ladminv4.2 and i was just wondering how to make it that only admins can use the gates and by the way they're automatic gates so i have no commands.

im new to scripting and don't know just short terms f you can explain it to me the easy way,other thing i used the so called friendly button(search) and i couldn't find anything in the search and it took me 2 and i half hour looking and didn't even find the sticky bout gates that ppl talk about
Reply
#29

Heres my problem:

I want to make a gate in front of a house for increased security, the thing is i can get the coordinates ok, but when i put the create object in the pawno, it spawns the gate over the correct coords, but like 5 feet in the air, and pointing the wrong way. How do i fix those, how do i find the percise rotation coordinates? Do you see what i mean?
Reply
#30

Most objects are offset, so you'll either have to use an editor of some type or adjust them manually
Reply
#31

Quote:
Originally Posted by FabianoC
Quote:
Originally Posted by John Sanders
pawn Code:
#include <samp>

new elevador;
It's Elevator, not elevador.
Oh, When i Saw Him Type Elevador Thats What i Thought He Wanted =/ xD
I'm not Dumb Lol <3
Reply
#32

Code:
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(200) : error 017: undefined symbol "gate"
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(206) : error 017: undefined symbol "gate"
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(212) : error 017: undefined symbol "gate"
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(218) : error 017: undefined symbol "gate"
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(222) : warning 209: function "OnPlayerCommandText" should return a value
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(206) : warning 204: symbol is assigned a value that is never used: "lgate"
C:\Users\Charlie\Desktop\SAMP Server\filterscripts\AdminIsland.pwn(218) : warning 204: symbol is assigned a value that is never used: "rgate"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Help xD
Reply
#33

i got this

C:\Users\BB\Desktop\larp.pwn(26405) : warning 202: number of arguments does not match definition
C:\Users\BB\Desktop\larp.pwn(26410) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.

what to do whit it
Reply
#34

Will this make it so that only a certain group can do it?
Reply
#35

Quote:
Originally Posted by AdvancedMapper
View Post
Will this make it so that only a certain group can do it?
It will not make it like that. You need to use variables along with an if statement.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)