Gates dupe on editing
#1

Once I edit a gate I use the new object editor and when I do and I finish one of those


PHP код:
else if(strcmp(x_job"open"true) == 0)
        {
             foreach(
Playeri)
            
//foreach(new i:Player)
            
{
                if(
GetPVarInt(i"EditingGateID") == gateid && != playerid)
                {
                    
format(stringsizeof(string), "ERROR: %s (ID: %d) is currently editing this gate."GetPlayerNameEx(i), i);
                    return 
SendClientMessageEx(playeridCOLOR_WHITEstring);
                }
            }
            
SetPVarInt(playerid"gEdit"1);
            
SetPVarInt(playerid"EditingGateID"gateid);
            
SetDynamicObjectPos(GateInfo[gateid][gGATE], GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            
SetDynamicObjectRot(GateInfo[gateid][gGATE], GateInfo[gateid][gRotX], GateInfo[gateid][gRotY], GateInfo[gateid][gRotZ]);
            
EditDynamicObject(playeridGateInfo[gateid][gGATE]);
            
format(stringsizeof(string), "You are now editing the open position of Gate %d."gateid);
            
SendClientMessage(playeridCOLOR_WHITEstring);
            
SendClientMessage(playerid0xFFFFAAAA"HINT: Hold {8000FF}~k~~PED_SPRINT~ {FFFFAA}to move your camera, press escape to cancel");
        }
        else if(
strcmp(x_job"closed"true) == 0)
        {
            foreach(
Playeri)
            
//foreach(new i:Player)
            
{
                if(
GetPVarInt(i"EditingGateID") == gateid && != playerid)
                {
                    
format(stringsizeof(string), "ERROR: %s (ID: %d) is currently editing this gate."GetPlayerNameEx(i), i);
                    return 
SendClientMessageEx(playeridCOLOR_WHITEstring);
                }
            }
            
SetPVarInt(playerid"gEdit"2);
            
SetPVarInt(playerid"EditingGateID"gateid);
            
EditDynamicObject(playeridGateInfo[gateid][gGATE]);
            
format(stringsizeof(string), "You are now editing the closed position of Gate %d."gateid);
            
SendClientMessage(playeridCOLOR_WHITEstring);
            
SendClientMessage(playerid0xFFFFAAAA"HINT: Hold {8000FF}~k~~PED_SPRINT~ {FFFFAA}to move your camera, press escape to cancel");
        } 
Then the gate duplicates. Where can I find this problem ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)