29.07.2015, 23:52
PHP код:
if(newkeys & YOUR KEY && IsPlayerInRangeOfPoint(playerid, 2,250.611,63.2995,1003.18))
{
if(gTeam[playerid] != YOUR TEAM)
{
SendClientMessage(playerid,COLOR_ERROR,"Acces denied");
return 1;
}
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;
}