Cells CMD
#1

Can someone say what's wrong in this cmd

PHP код:
CMD:cells(playeridparams[])
{
    new 
string[128];
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
{
        
GetPlayerPosplayeridPositions[0][0], Positions[0][1], Positions[0][2]);
        
GetDynamicObjectPos(cell0Positions[0][0], Positions[0][1], Positions[0][2]);
        
GetDynamicObjectPos(cell1Positions[1][0], Positions[1][1], Positions[1][2]);
        
GetDynamicObjectPos(cell2Positions[2][0], Positions[2][1], Positions[2][2]);
        
GetDynamicObjectPos(cell3Positions[3][0], Positions[3][1], Positions[4][2]);
        
GetDynamicObjectPos(cell4Positions[4][0], Positions[4][1], Positions[4][2]);
        
GetDynamicObjectPos(cell5Positions[5][0], Positions[5][1], Positions[5][2]);
        
GetDynamicObjectPos(cell6Positions[6][0], Positions[6][1], Positions[6][2]);
        
GetDynamicObjectPos(cell7Positions[7][0], Positions[7][1], Positions[7][2]);
        
GetDynamicObjectPos(cell8Positions[8][0], Positions[8][1], Positions[8][2]);
           
GetDynamicObjectPos(cell9Positions[9][0], Positions[9][1], Positions[9][2]);
        
GetDynamicObjectPos(cell10Positions[0][0], Positions[10][1], Positions[10][2]);
        
GetDynamicObjectPos(cell11Positions[1][0], Positions[11][1], Positions[11][2]);
        
GetDynamicObjectPos(cell12Positions[2][0], Positions[12][1], Positions[12][2]);
        
GetDynamicObjectPos(cell13Positions[3][0], Positions[13][1], Positions[13][2]);
        if(
IsPlayerInRangeOfPoint(playerid8.01827.80004883,-1729.19995117,5202.79980469)) {
         if(
Cell0Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell0,1827.80004883+1.25,-1729.19995117,5202.79980469,0.50);
            
Cell0Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell0,1827.80004883,-1729.19995117,5202.79980469,0.50);
         
Cell0Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01831.00000000,-1729.19995117,5202.79980469)) {
         if(
Cell1Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell1,1831.00000000+1.25,-1729.19995117,5202.79980469,0.50);
            
Cell1Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell1,1831.00000000,-1729.19995117,5202.79980469,0.50);
         
Cell1Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01834.19995117,-1729.19995117,5202.79980469)) {
         if(
Cell2Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell2,1834.19995117+1.25,-1729.19995117,5202.79980469,0.50);
            
Cell2Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell2,1834.19995117,-1729.19995117,5202.79980469,0.50);
         
Cell2Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01837.40002441,-1729.19995117,5202.79980469)) {
         if(
Cell3Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell3,1837.40002441+1.25,-1729.19995117,5202.79980469,0.50);
            
Cell3Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell3,1837.40002441,-1729.19995117,5202.79980469,0.50);
         
Cell3Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01840.59997559,-1729.19995117,5202.79980469)) {
         if(
Cell4Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell4,1840.59997559+1.25,-1729.19995117,5202.79980469,0.50);
            
Cell4Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell4,1840.59997559,-1729.19995117,5202.79980469,0.50);
         
Cell4Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01827.80004883,-1729.19995117,5206.39990234)) {
         if(
Cell5Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell5,1827.80004883+1.25,-1729.19995117,5206.39990234,0.50);
            
Cell5Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell5,1827.80004883,-1729.19995117,5206.39990234,0.50);
         
Cell5Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01831.00000000,-1729.19995117,5206.39990234)) {
         if(
Cell6Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell6,1831.00000000+1.25,-1729.19995117,5206.39990234,0.50);
            
Cell6Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell6,1831.00000000,-1729.19995117,5206.39990234,0.50);
         
Cell6Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01834.19995117,-1729.19995117,5206.39990234)) {
         if(
Cell7Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell7,1834.19995117+1.25,-1729.19995117,5206.39990234,0.50);
            
Cell7Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell7,1834.19995117,-1729.19995117,5206.39990234,0.50);
         
Cell7Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01837.40002441,-1729.19995117,5206.39990234)) {
         if(
Cell8Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell8,1837.40002441+1.25,-1729.19995117,5206.39990234,0.50);
            
Cell8Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell8,1837.40002441,-1729.19995117,5206.39990234,0.50);
         
Cell8Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01840.59997559,-1729.19995117,5206.39990234)) {
         if(
Cell9Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell9,1840.59997559+1.25,-1729.19995117,5206.39990234,0.50);
            
Cell9Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell9,1840.59997559,-1729.19995117,5206.39990234,0.50);
         
Cell9Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01843.80004883,-1729.19995117,5206.39990234)) {
         if(
Cell10Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell10,1843.80004883+1.25,-1729.19995117,5206.39990234,0.50);
            
Cell10Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell10,1843.80004883,-1729.19995117,5206.39990234,0.50);
         
Cell10Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01843.80004883,-1729.19995117,5202.79980469)) {
         if(
Cell11Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell11,1843.80004883+1.25,-1729.19995117,5202.79980469,0.50);
            
Cell11Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell11,1843.80004883,-1729.19995117,5202.79980469,0.50);
         
Cell11Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01843.80004883,-1729.19995117,5209.89990234)) {
         if(
Cell12Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell12,1843.80004883+1.25,-1729.19995117,5209.89990234,0.50);
            
Cell12Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell12,1843.80004883,-1729.19995117,5209.89990234,0.50);
         
Cell12Status 0;
             }
        }
                if(
IsPlayerInRangeOfPoint(playerid8.01840.59997559,-1729.19995117,5209.89990234)) {
         if(
Cell13Status == 0) {
            
formatstringsizeof( string ), "* %s uses their remote to open the cell gates."GetPlayerNameEx(playerid));
            
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
MoveDynamicObject(cell13,1840.59997559+1.25,-1729.19995117,5209.89990234,0.50);
            
Cell13Status 1;
           }
                else {
         
formatstringsizeof( string ), "* %s uses their remote to close cell gates."GetPlayerNameEx(playerid));
         
ProxDetector(5.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         
MoveDynamicObject(cell13,1840.59997559,-1729.19995117,5209.89990234,0.50);
         
Cell13Status 0;
             }
       }
       }
    return 
1;

Because when i add it in server, my mapping disapears
Reply
#2

Check your GM and filterscripts and look for CreateObject
I'm guessing you use Incognitos streamer and if you then use CreateObject insted of CreateDynamicObject either the DynamicObject's dissapear or the CreateObjects dissapear (differant form time to time)
Reply
#3

I fixed it. Next time read what i have wrote in cmd xD I am idiot i forgot change
PHP код:
        GetDynamicObjectPos(cell10Positions[0][0], Positions[10][1], Positions[10][2]); 
        
GetDynamicObjectPos(cell11Positions[1][0], Positions[11][1], Positions[11][2]); 
        
GetDynamicObjectPos(cell12Positions[2][0], Positions[12][1], Positions[12][2]); 
        
GetDynamicObjectPos(cell13Positions[3][0], Positions[13][1], Positions[13][2]); 
Who can say how can i edit Range point where i type /cells, if i type /cells now it opens 6 cells around.
Reply
#4

Quote:
Originally Posted by FaZeRs
Посмотреть сообщение
I fixed it. Next time read what i have wrote in cmd xD I am idiot i forgot change
PHP код:
        GetDynamicObjectPos(cell10Positions[0][0], Positions[10][1], Positions[10][2]); 
        
GetDynamicObjectPos(cell11Positions[1][0], Positions[11][1], Positions[11][2]); 
        
GetDynamicObjectPos(cell12Positions[2][0], Positions[12][1], Positions[12][2]); 
        
GetDynamicObjectPos(cell13Positions[3][0], Positions[13][1], Positions[13][2]); 
Who can say how can i edit Range point where i type /cells, if i type /cells now it opens 6 cells around.
Oh, sorry now I noticed that lol..
I just read that your mapping dissapears and I saw DynamicObject so I thought you had the same problem as me..

And to change the range just change the range in IsPlayerInRangeOfPoint(playerid, range, x, y, z);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)