Help! The gate not work
#1

Dear All

for the moment, the gm compile all ok
so when i write the command not open de gate :S
i appreciate your help

that say, The Gate is opened.Welcome! but not move the object

Code:
	psur = CreateDynamicObject(971,-982.02215576,490.67080688,3.03113890,0.00000000,0.00000000,46.00000000); //puerta sur

CMD:ps(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 4 || IsPlayerAdmin(playerid)) {
		MoveObject(psur, -982.02215576,490.67080688,-1.803113890, 3);
	 	SendClientMessage(playerid,	0xFFFF00AA,"The Gate is opened.Welcome!");
	 	return 1;
	} else return SendClientMessage(playerid,COLOR_RED,"ERROR: You are not a high enough level to use this command");
}
Reply
#2

not tested
pawn Code:
psur = CreateDynamicObject(971,-982.02215576,490.67080688,3.03113890,0.00000000,0.00000000,46.00000000); //puerta sur

CMD:ps(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 4 || IsPlayerAdmin(playerid)) {
        MoveDynamicObject(psur, -982.02215576,490.67080688,-1.803113890, 3);
        SendClientMessage(playerid, 0xFFFF00AA,"The Gate is opened.Welcome!");
        return 1;
    } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You are not a high enough level to use this command");
}
or

pawn Code:
psur = CreateObject(971,-982.02215576,490.67080688,3.03113890,0.00000000,0.00000000,46.00000000); //puerta sur

CMD:ps(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 4 || IsPlayerAdmin(playerid)) {
        MoveObject(psur, -982.02215576,490.67080688,-1.803113890, 3);
        SendClientMessage(playerid, 0xFFFF00AA,"The Gate is opened.Welcome!");
        return 1;
    } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You are not a high enough level to use this command");
}
Reply
#3

LOL i got the problem, but ill not erase this post,
maybe someone have the same problem

if your are puting
psur = CreateDynamicObject(971,-982.02215............

is a DynamicObject so you need put it

MoveDynamicObject(psur, -982.0221.......................
and not
MoveObject(psur, -982.0221.................

im sorry im learning hehe
Reply
#4

im already post
Reply
#5

Quote:
Originally Posted by venice
View Post
im already post
hehehe yes, at the same time,
thanks for answer venice
Reply
#6

How to put a timer for close the door after 2 seconds?
Reply
#7

on up gamemode
pawn Code:
forward GateClose(playerid);
pawn Code:
public GateClose(playerid)
{
      MoveDynamicObject(psur,-982.02215576,490.67080688,3.803113890, 3);
      psur = 0;
      return 1;
}

pawn Code:
psur = CreateObject(971,-982.02215576,490.67080688,3.03113890,0.00000000,0.00000000,46.00000000); //puerta sur

CMD:ps(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 4 || IsPlayerAdmin(playerid)) {
        MoveObject(psur, -982.02215576,490.67080688,-1.803113890, 3);
        SetTimer("GateClose", 10000, 0);
        SendClientMessage(playerid, 0xFFFF00AA,"The Gate is opened.Gate Automatically Closed In 10 Seconds");
        return 1;
    } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You are not a high enough level to use this command");
}
Reply
#8

ok i have 3 doors with passwords,
so i need put all 3 doors in this code?

Code:
public GateClose(playerid)
{
      MoveDynamicObject(psur,-982.02215576,490.67080688,3.803113890, 3);
      psur = 0;
      return 1;
}
Reply
#9

see this make urself.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)