29.07.2015, 17:18
I want to create a keypads on the door of LSPD.\
This is the code for opening the door.
I want only LSPD members can open the doors.
This is the code for opening the door.
PHP код:
if(IsPlayerInRangeOfPoint(playerid, 2,250.611,63.2995,1003.18))
{
if(lspd1 == 0)
{
MoveDynamicObject(lspddoor1, 250.611,63.2995,1000.64, 4.5000);
SendClientMessage(playerid, COLOR_BLUE,"SAPD door is open, please close it!");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s takes his/her remote control and opens the door.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
lspd1 = 1;
}
else
{
MoveDynamicObject(lspddoor1, 250.611,63.2995,1003.04, 4.5000);
SendClientMessage(playerid, COLOR_BLUE,"SAPD door is closed, thank you!");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s takes his/her remote control and closes the door.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
lspd1 = 0;
}