ZCMD returns 0
#1

Hello, I have a problem with a command that doesn't seem to work. It's suppose to call a callback but it returns me that the command was not found. All my other commands works so... I've also tried calling the callback then returning as true, but still the same.

Well this is the BASIC code:
pawn Код:
COMMAND:gate(playerid, params[])
{
    return ToggleGates(1, 4.0);
}
If you coulden't understand:
pawn Код:
ToggleGates(gateid, Float:speed);
Reply
#2

Show us the toggleGates callback
Reply
#3

pawn Код:
public ToggleGates(whatgate, Float:speed)
{
    printf("test");
    switch(Gates[whatgate][status])
    {
        case 0:
        {
            MoveDynamicObject(Gates[whatgate][gateid], Gates[whatgate][openx], Gates[whatgate][openy], Gates[whatgate][openz], speed);
            Gates[whatgate][status] = 1;
            print("Gate is closed, opening!");
        }
        case 1:
        {
            MoveDynamicObject(Gates[whatgate][gateid], Gates[whatgate][closedx], Gates[whatgate][closedy], Gates[whatgate][closedz], speed);
            Gates[whatgate][status] = 0;
            print("Gate is open, closing");
        }
    }
    print("Recieved gate");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)