Gates not working
#9

PHP код:
new opened1;
new 
opened2;
new 
gate1;
new 
gate2
PHP код:
gate1 CreateObject(9801792.6700439453, -1284.728271484415.406204223633000); //GATE1!
gate2 CreateObject(9801788.2348632813, -1298.305786132814.098407745361000); //GATE2! 
PHP код:
if(strcmp("/gate1"cmdtexttrue6) == 0) {/////WITH ONLY ONE COMMAND!
    
if(opened1 == 0) {
    new 
name[MAX_PLAYER_NAME+1];
    new 
String128[128];
    
GetPlayerName(playeridnamesizeof(name));
    
format(String128sizeof(String128), "%s has opened the gate!"name);
    
SendClientMessageToAll(0x33AA33AAString128);
    
SendClientMessage(playerid0x33AA33AA,"Gate Opened!");
    
MoveObject(gate1,1792.6700439453, -1284.728271484415.4062042236332.5);//OPEN
    
opened1 1;
    } else if(
opened1 == 1) {
    new 
name[MAX_PLAYER_NAME+1];
    new 
String128[128];
    
GetPlayerName(playeridnamesizeof(name));
    
format(String128sizeof(String128), "%s has closed the gate!"name);
    
SendClientMessageToAll(0xAA3333AAString128);
    
SendClientMessage(playerid0xAA3333AA,"Gate Closed!");
    
MoveObject(gate11792.6700439453, -1284.72827148448.73122596740722.5);//CLOSE
    
opened1 0;
    }
    return 
1;
}
if(
strcmp("/gate2"cmdtexttrue6) == 0) {/////WITH ONLY ONE COMMAND!
    
if(opened2 == 0) {
    new 
name[MAX_PLAYER_NAME+1];
    new 
String128[128];
    
GetPlayerName(playeridnamesizeof(name));
    
format(String128sizeof(String128), "%s has opened the gate 2!"name);
    
SendClientMessageToAll(0x33AA33AAString128);
    
SendClientMessage(playerid0x33AA33AA,"Gate 2 Opened!");
    
MoveObject(gate1,1799.7746582031, -1298.762329101614.0984077453612.5);//OPEN1
    
opened1 1;
    } else if(
opened2 == 1) {
    new 
name[MAX_PLAYER_NAME+1];
    new 
String128[128];
    
GetPlayerName(playeridnamesizeof(name));
    
format(String128sizeof(String128), "%s has closed the gate 2!"name);
    
SendClientMessageToAll(0xAA3333AAString128);
    
SendClientMessage(playerid0xAA3333AA,"Gate 2 Closed!");
    
MoveObject(gate11788.2348632813, -1298.305786132814.0984077453612.5);//CLOSE
    
opened2 0;
    }
    return 
1;

Reply


Messages In This Thread
Gates not working - by luckie12 - 08.01.2011, 08:46
Re: Gates not working - by luckie12 - 08.01.2011, 11:53
Re: Gates not working - by Kyosaur - 08.01.2011, 12:01
Re: Gates not working - by Karlip - 08.01.2011, 12:02
Re: Gates not working - by Kyosaur - 08.01.2011, 12:07
Re: Gates not working - by luckie12 - 08.01.2011, 12:35
Re: Gates not working - by Karlip - 08.01.2011, 12:38
Re: Gates not working - by luckie12 - 08.01.2011, 12:49
Re: Gates not working - by LZLo - 08.01.2011, 14:11

Forum Jump:


Users browsing this thread: 2 Guest(s)