[Help] Move Door ( At LSPD Chief office )
#1

Help please.
I tryed something but failed, I need to script a Door that moves at LSPD Lobby or Chief's office by pressing button " f "
Help please i need it ASAP. Can someone tell me how to fix it?
I really need it ASAP, I will + rep who will help me, thanks brothers.
Reply
#2

Ok follow
On top do it
Код:
door1;
Код:
public OnGameModeInit()
                   door1 = CreateObject(2990,1539.30004883,-1628.09997559,16.29999924,0.00000000,0.00000000,270.00000000);//IT'S SHOULD BE CLOSED DOOR
Put this Code in public OnPlayerCommandText(playerid, cmdtext[])

Код:
	return 1;
	
}
if (strcmp("/PDclose", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1539.30004883,-1628.09997559,16))
MoveObject(door1,1539.30004883,-1628.09997559,16,2);
SendClientMessage(playerid, lightblue, "Hello Officer you have Closed the Gate");
here you will close the Door/Gate

Код:
	return 1;

}
if (strcmp("/PDopen", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1539.00000000,-1638.30004883,16))
MoveObject(door1,1539.00000000,-1638.30004883,16,2);
SendClientMessage(playerid, lightblue, "Hello Officer you have Opened the Gate");
Ok there you have MOVING gate sys

NOTE:Coped it from my Server This is cradit to Me
And it's not A door it's gate but make your Own Moving Door, Like this just change the posX posY posZ
Reply
#3

Wish it's helped you
Reply
#4

Are you trying to do it where they just press F and the door opens? Or they press F then then the keypad animation shows and if they are Chief, then the door opens?
Reply
#5

can you give me the location of the place or cordinates of the door i can make them working like
when a player or check is near the doors if he prees f the doors will open and again f the doors will close
Reply
#6

oh i don't know how make it's open/closed with F i only know how make it OPen/close with CMD
Reply
#7

Quote:
Originally Posted by Alexy_Dramon
Посмотреть сообщение
oh i don't know how make it's open/closed with F i only know how make it OPen/close with CMD
It's actually really simple.

pawn Код:
public OnPlayerKeyStateChange(playerid, oldkeys, newkeys)
{
    if(newkeys & KEY_SECONDARY_ATTACK)
    {
        if(IsPlayerInRangeOfPoint(playerid,2,x,y,z)
        {
            MoveObject(blahblah);
           
        }
        return 1;
    }
    return 1;
}
Reply
#8

Quote:
Originally Posted by TRIPLE-xXx-GAMEING
Посмотреть сообщение
can you give me the location of the place or cordinates of the door i can make them working like
when a player or check is near the doors if he prees f the doors will open and again f the doors will close
Yes, Only Chief and D.Chief. If he presses F the door will be opened and closed automaticaly about 4 secs or 5
Reply
#9

Quote:
Originally Posted by Alexy_Dramon
Посмотреть сообщение
Ok follow
On top do it
Код:
door1;
Код:
public OnGameModeInit()
                   door1 = CreateObject(2990,1539.30004883,-1628.09997559,16.29999924,0.00000000,0.00000000,270.00000000);//IT'S SHOULD BE CLOSED DOOR
Put this Code in public OnPlayerCommandText(playerid, cmdtext[])

Код:
	return 1;
	
}
if (strcmp("/PDclose", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1539.30004883,-1628.09997559,16))
MoveObject(door1,1539.30004883,-1628.09997559,16,2);
SendClientMessage(playerid, lightblue, "Hello Officer you have Closed the Gate");
here you will close the Door/Gate

Код:
	return 1;

}
if (strcmp("/PDopen", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1539.00000000,-1638.30004883,16))
MoveObject(door1,1539.00000000,-1638.30004883,16,2);
SendClientMessage(playerid, lightblue, "Hello Officer you have Opened the Gate");
Ok there you have MOVING gate sys

NOTE:Coped it from my Server This is cradit to Me
And it's not A door it's gate but make your Own Moving Door, Like this just change the posX posY posZ
I tryed this but failed again. Damn, I am begined scriper, so here are the warnings..

C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(35) : error 017: undefined symbol "door1"
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(3 : error 055: start of function body without function header
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(40) : error 021: symbol already defined: "SetGameModeText"
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(42) : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(9 : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(100) : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(103) : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(105) : error 054: unmatched closing brace ("}")
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(106) : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(10 : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(112) : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(115) : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(117) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


13 Errors.
Reply
#10

Quote:
Originally Posted by Leko
Посмотреть сообщение
I tryed this but failed again. Damn, I am begined scriper, so here are the warnings..

C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(35) : error 017: undefined symbol "door1"
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(3 : error 055: start of function body without function header
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(40) : error 021: symbol already defined: "SetGameModeText"
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(42) : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(9 : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(100) : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(103) : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(105) : error 054: unmatched closing brace ("}")
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(106) : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(10 : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(112) : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(115) : error 010: invalid function or declaration
C:\Documents and Settings\Nadi\Desktop\Server\gamemodes\LSPD Door.pwn(117) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


13 Errors.
hUH TRY THIS

Код:
#pragma tabsize 0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)