Command problem
#1

I've made cmd so players can open and close gates.It worked well,and i didn't do anything special,i just added few cars,but that shouldn't do any difference.
Well when i type /gd1op doors don't open.
Pawno also don't show any error or warning.
Its strange since i don't have #Include <zcmd>
So i don't know what is the problem.


Create Object codes


OnPlayerCommandText


When I Compile


Any solution?
Reply
#2

"/gd1op" has lenght 6, not 10. Does it send the message? If it sends the message, then the coordinates are wrong when you're moving the object.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/gd1op", true))
    {
        //MoveObject( ... );
        //SendClientMessage( ... );
        return 1;
    }
    return 0;
}
Reply
#3

It Dosen't show the message.And i've checked the coordinates and they are good.As i said it worked before.Dunno why it dosen't now.
Reply
#4

Does it return false/0 at the end of the callback? I've seen a lot of times, that strcmp doesn't work sometimes and the best solution is to switch to ZCMD. You won't have any problem with it, it's faster and easier. Also, it is compatitive with sscanf which is very good.
Reply
#5

It is return 0;
Well i'll try to change it to ZCMD.
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)