Affichage des articles dont le libellé est /gate bugged. Afficher tous les articles
Affichage des articles dont le libellé est /gate bugged. Afficher tous les articles

samedi 23 juillet 2016

/gate bugged

after /creategate I cant open it like only Once I can move it with /gate [they are movable] second time i cant.

Here is the code.

PHP Code:

[PHP]CMD:gate(playerid, params[])
{
    if(!
IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    
// Dynamic Gates
    
for(new idx=1; idx<MAX_GATES; idx++)
    {
        if(
GateInfo[idx][gModel] && IsPlayerInRangeOfPoint(playerid, 15, GateInfo[idx][gCX], GateInfo[idx][gCY], GateInfo[idx][gCZ]))
        {
            if(
strlen(GateInfo[idx][gPassword]))
            {
                if(
sscanf(params, "s[256]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gate [password]");
                if(
strcmp(params, GateInfo[idx][gPassword])) return SendClientMessage(playerid, COLOR_GREY, "Invalid gate password.");
                if(!
GateInfo[idx][gStatus])
                {
                    
GateInfo[idx][gStatus] = 1;
                    
MoveDynamicObject(GateInfo[idx][gGate], GateInfo[idx][gOX], GateInfo[idx][gOY], GateInfo[idx][gOZ], GateInfo[idx][gSpeed]);
                    
SetDynamicObjectRot(GateInfo[idx][gGate], GateInfo[idx][gORX], GateInfo[idx][gORY], GateInfo[idx][gORZ]);
                }
                else
                {
                    
GateInfo[idx][gStatus] = 0;
                    
MoveDynamicObject(GateInfo[idx][gGate], GateInfo[idx][gCX], GateInfo[idx][gCY], GateInfo[idx][gCZ], GateInfo[idx][gSpeed]);
                    
SetDynamicObjectRot(GateInfo[idx][gGate], GateInfo[idx][gCRX], GateInfo[idx][gCRY], GateInfo[idx][gCRZ]);
                }
            }
            else
            {
                if(!
GateInfo[idx][gStatus])
                {
                    
GateInfo[idx][gStatus] = 1;
                    
MoveDynamicObject(GateInfo[idx][gGate], GateInfo[idx][gOX], GateInfo[idx][gOY], GateInfo[idx][gOZ], GateInfo[idx][gSpeed]);
                    
SetDynamicObjectRot(GateInfo[idx][gGate], GateInfo[idx][gORX], GateInfo[idx][gORY], GateInfo[idx][gORZ]);
                }
                else
                {
                    
GateInfo[idx][gStatus] = 0;
                    
MoveDynamicObject(GateInfo[idx][gGate], GateInfo[idx][gCX], GateInfo[idx][gCY], GateInfo[idx][gCZ], GateInfo[idx][gSpeed]);
                    
SetDynamicObjectRot(GateInfo[idx][gGate], GateInfo[idx][gCRX], GateInfo[idx][gCRY], GateInfo[idx][gCRZ]);
                }
            }
            
idx = MAX_GATES;
            return 
1;
        }
    } 

[/PHP]

Let's block ads! (Why?)



/gate bugged