08.12.2011, 21:39
Hey guys, i have a litlle problem with my script, please help, don't delete this post. thanks
When i had server version 0.3c all things go well but yestarday i change my gamemode on 0.3d and now i have a problem, my doors don't open in the same way like it did before for example look how the door open now:
http://postimage.org/image/pshj144fd/ - close door( when I enter in lspd)
http://postimage.org/image/ncfpn9mcp/ - open door(after I prees the key to open the door)
http://postimage.org/image/llwols4tl/ - close door( after i press the key to close the door)
All the door open in the same way, like the first one and like this( http://s11.postimage.org/unu21qd7n/sa_mp_006.png)
Script for open or close the door:
Sorry for my bad english.
When i had server version 0.3c all things go well but yestarday i change my gamemode on 0.3d and now i have a problem, my doors don't open in the same way like it did before for example look how the door open now:
http://postimage.org/image/pshj144fd/ - close door( when I enter in lspd)
http://postimage.org/image/ncfpn9mcp/ - open door(after I prees the key to open the door)
http://postimage.org/image/llwols4tl/ - close door( after i press the key to close the door)
All the door open in the same way, like the first one and like this( http://s11.postimage.org/unu21qd7n/sa_mp_006.png)
Script for open or close the door:
PHP код:
new lspddoor2;
new lspd2;
public OnGameModeInit()
{
lspd2 = 0;
lspddoor2 = CreateDynamicObject(5422, 246.228,72.4962,1003.04,0.00,0.00,90.00);
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ( PRESSED(KEY_LOOK_BEHIND) )
{
if(IsAPDMember(playerid) || PlayerInfo[playerid][pAdmin] >= 6)
{
if(IsPlayerInRangeOfPoint(playerid, 2,246.228,72.4962,1003.04))
{
if(lspd2 == 0)
{
MoveDynamicObject(lspddoor2, 246.228,72.4962,1000.63, 4.5);
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);
lspd2 = 1;
}
else
{
MoveDynamicObject(lspddoor2, 246.228,72.4962,1003.18, 4.5);
SendClientMessage(playerid, COLOR_BLUE,"SAPD Control 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);
lspd2 = 0;
}
}
}
}
return 1;
}