Help please
#1

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:
PHP код:
new lspddoor2;
new 
lspd2;
public 
OnGameModeInit()
{
      
lspd2 0;
      
lspddoor2 CreateDynamicObject(5422246.228,72.4962,1003.04,0.00,0.00,90.00);
      return 
1;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if ( 
PRESSED(KEY_LOOK_BEHIND) )
     {
        if(
IsAPDMember(playerid) || PlayerInfo[playerid][pAdmin] >= 6)
         {
               if(
IsPlayerInRangeOfPoint(playerid2,246.228,72.4962,1003.04))
            {
                if(
lspd2 == 0)
                {
                      
MoveDynamicObject(lspddoor2246.228,72.4962,1000.634.5);
                      
SendClientMessage(playeridCOLOR_BLUE,"SAPD door is open, please close it!");
                      
GetPlayerName(playeridsendernamesizeof(sendername));
                      
format(stringsizeof(string), "* %s takes his/her remote control and opens the door."sendername);
                      
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3COLOR_CHAT4,COLOR_CHAT5);
                      
lspd2 1;
                }
                      else
                {
                    
MoveDynamicObject(lspddoor2246.228,72.4962,1003.184.5);
                      
SendClientMessage(playeridCOLOR_BLUE,"SAPD Control door is closed, thank you!");
                      
GetPlayerName(playeridsendernamesizeof(sendername));
                      
format(stringsizeof(string), "* %s takes his/her remote control and Closes the door.",sendername);
                      
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                      
lspd2 0;
                }
            }
        }
    }
    return 
1;

Sorry for my bad english.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)