Quick STRCMP to DCMD Tutorial please
#6

Quote:
Originally Posted by Seven.
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
        dcmd(heal,4,cmdtext); // heal has 4 letters so you enter a 4
        dcmd(help,4,cmdtext); // same here..
        return 0;
}
pawn Код:
dcmd_heal(playerid,params[])
{
#pragma unused params
SetPlayerHealth(playerid,100);
return true;
}
pawn Код:
dcmd_help(playerid,params[])
{
#pragma unused params
SendClientMessage(playerid,color,"Help message?");
return true;
}
So this dcmd(heal,4,cmdtext);

is like this new cmd[256]; ?

And wow how easy is DCMD :O i now see how its processed faster and it acually looks easier to type xD

BTW no includes or special functions?? And callbacks stay the same?

Kool thanks dude ima start scripting in DCMD now


EDIT: this #pragma unused params is needed for every single command?
Reply


Messages In This Thread
Quick STRCMP to DCMD Tutorial please - by <Weponz> - 30.10.2010, 18:56
Re: Quick STRCMP to DCMD Tutorial please - by WillyP - 30.10.2010, 19:03
Re: Quick STRCMP to DCMD Tutorial please - by Seven. - 30.10.2010, 19:05
Re: Quick STRCMP to DCMD Tutorial please - by <Weponz> - 30.10.2010, 19:07
Re: Quick STRCMP to DCMD Tutorial please - by Seven. - 30.10.2010, 19:12
Re: Quick STRCMP to DCMD Tutorial please - by <Weponz> - 30.10.2010, 19:20
Re: Quick STRCMP to DCMD Tutorial please - by WillyP - 30.10.2010, 19:22
Re: Quick STRCMP to DCMD Tutorial please - by karakana7 - 30.10.2010, 19:29
Re: Quick STRCMP to DCMD Tutorial please - by Cameltoe - 30.10.2010, 19:31
Re: Quick STRCMP to DCMD Tutorial please - by karakana7 - 30.10.2010, 19:35

Forum Jump:


Users browsing this thread: 1 Guest(s)