[Pawn] dcmd help
#1

dcmd(id, len, cmdtext); what number does len have to be because when I do this

dcmd(register, 8, cmdtext);
dcmd(login, 5, cmdtext);
dcmd(pay,3,cmdtext);
dcmd(id, 2, cmdtext);
dcmd(tele, 4, cmdtext);
dcmd(ptele, 6, cmdtext);

most of my commands work but when its this -

dcmd(register, 8, cmdtext);
dcmd(login, 5, cmdtext);
dcmd(pay,3,cmdtext);
dcmd(id, 1, cmdtext);
dcmd(tele, 4, cmdtext);
dcmd(ptele, 4, cmdtext);

only one might work, can someone please define how dcmd works to me.
Reply
#2

len is the length of your command, register being 8 characters and login 5.
Reply
#3

cool thanks
Reply
#4

yes my script actually fully works now, awesome thank you so much
Reply
#5

Example.
pawn Код:
dcmd(heal, 4, cmdtext);
"That line basically declares the command, it checks the variable cmdtext to see if you typed /heal, the number 4 is the length of the word "heal", the word "heal" (without double quotes) is both the command to type and part of the function to call."

https://sampwiki.blast.hk/wiki/Fast_Commands

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)