Gate open/close help -
Ryan_Michael - 25.07.2012
Could someone help me so i can change the doors to the codes i show? I have tried and cant get it.
The code for it
Код:
CMD:door(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Oficer.");
if(IsPlayerInRangeOfPoint(playerid, 3, 246.381317,72.578338,1003.706604) || IsPlayerInRangeOfPoint(playerid, 3, 246.381317,72.292190,1003.706604))
{
if(!SAPDLobbyStatus) // SAPD LOBBY
{
MoveDynamicObject(SAPDLobby[0], 1487.00000000,-1762.42504883,3284.23608398, 1.50);
MoveDynamicObject(SAPDLobby[1], 245.480, 72.5750, 1003.6650, 1.50);
MoveDynamicObject(SAPDLobby[2], 247.888, 72.4500, 1003.7000, 1.50);
MoveDynamicObject(SAPDLobby[3], 244.908, 72.4500, 1003.7000, 1.50);
format(string, sizeof(string), "* %s puts their finger on the scanner and opens the lobby door.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
SAPDLobbyStatus = 1;
SetTimer("SAPDLobbyTimer", 3000, false);
}
else if(SAPDLobbyStatus)
{
MoveDynamicObject(SAPDLobby[0], 1487.00000000,-1762.42504883,3284.23608398, 1.50);
MoveDynamicObject(SAPDLobby[1], 246.4050, 72.5750, 1003.6650, 1.50);
MoveDynamicObject(SAPDLobby[2], 246.9850, 72.4500, 1003.7000, 1.50);
MoveDynamicObject(SAPDLobby[3], 245.8330, 72.4500, 1003.7000, 1.50);
format(string, sizeof(string), "* %s %s puts their finger on the scanner and closes the lobby door.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
SAPDLobbyStatus = 0;
}
}
doors i want to change it too.
Код:
//Doors
SAPDLobby[0] = CreateObject(1495,1487.00000000,-1762.42504883,3284.23608398,0.00000000,0.00000000,270.00000000); //object(gen_doorext01) (1)
CreateObject(1495,1483.79003906,-1762.42504883,3284.23608398,0.00000000,0.00000000,270.00000000); //object(gen_doorext01) (2)
CreateObject(1495,1479.85998535,-1758.31994629,3284.23388672,0.00000000,0.00000000,0.00000000); //object(gen_doorext01) (2)
CreateObject(1495,1467.06701660,-1758.31994629,3284.23388672,0.00000000,0.00000000,0.00000000); //object(gen_doorext01) (2)
Then this
Код:
if(SAPDLobbyStatus == 1)
{
MoveDynamicObject(SAPDLobby[0], 1491.2148, -1764.9000, 3284.2504, 1.50);
MoveDynamicObject(SAPDLobby[1], 246.4050, 72.5750, 1003.6650, 1.50);
MoveDynamicObject(SAPDLobby[2], 246.9850, 72.4500, 1003.7000, 1.50);
MoveDynamicObject(SAPDLobby[3], 245.8330, 72.4500, 1003.7000, 1.50);
SAPDLobbyStatus = 0;
foreach(Player, i)
{
if(IsPlayerInRangeOfPoint(i, 15, 246.381317,72.578338,1003.706604) || IsPlayerInRangeOfPoint(i, 3, 246.381317,72.292190,1003.706604))
{
SendClientMessage(i, COLOR_PURPLE, "* The lobby door automatically closes. (( SAPD Lobby ))");
}
}
}
Re: Gate open/close help -
Kaperstone - 25.07.2012
pawn Код:
SAPDLobby[0] = CreateObject(1495,1487.00000000,-1762.42504883,3284.23608398,0.00000000,0.00000000,270.00000000);
SAPDLobby[1] = CreateObject(1495,1483.79003906,-1762.42504883,3284.23608398,0.00000000,0.00000000,270.00000000);
SAPDLobby[2] = CreateObject(1495,1479.85998535,-1758.31994629,3284.23388672,0.00000000,0.00000000,0.00000000);
SAPDLobby[3] = CreateObject(1495,1467.06701660,-1758.31994629,3284.23388672,0.00000000,0.00000000,0.00000000);
Re: Gate open/close help -
Ryan_Michael - 25.07.2012
I got that but the other part i need help with