Simple /gate CMD
#1

Did that :
PHP код:
    if(strcmp(cmdtext,"/ddgate"true) == 0)
    {
        
MoveDynamicObject(DDEPOT,1895.0921630859, -1879.759277343813.479251861572,2); //object(phils_compnd_gate) (2)
        
SendClientMessage(playeridCOLOR_YELLOW"Drug Depot Gate has Been opened.");
        return 
1;
    } 
and it's not working - the Client Message works but the gate not working {Rep+ for Helping}
Reply
#2

pawn Код:
public OnGameModeInIt()
{
    // 12 is random Object. What is the DDEPOT?
    CreateObject(12, 1950.0921630859, -1879.7592773438, 13.479251861572, 0.0, 0.0, 96.0); // Make sure the X, Y, Z aren't the same.
    return 1;
}
pawn Код:
if(strcmp("/ddgate", cmdtext, true, 7) == 0)
{  
    MoveDynamicObject(12, 1895.0921630859, -1879.7592773438, 13.479251861572, 2.0); // objectid
    SendClientMessage(playerid, COLOR_YELLOW, "Drug Depot Gate has Been opened.");
    return 1;
}
Reply
#3

DDepot is the gate name that i already defined up :

PHP код:
new DDEPOT
PHP код:
DDEPOT CreateDynamicObject(9681895.0921630859, -1879.759277343813.4792518615720900); 
Reply
#4

The mistake is on Coordinates (X, Y, Z). Coordinates from CreateDynamicObject are same as MoveDynamicObject.
The objects can't move in the same position. Change it!
Reply
#5

oh , my bad - didn't notice that , thanks , repped
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)