Zcmd / Strcmp
#4

Most people suggest ZCMD , because it is easier?
pawn Код:
if( strcmp( cmdtext, "/test", true, 5 ) == 0 )
{
    new id;
    id = strval( cmdtext );
    return SendClientMessage( id, 0xAAAAAA, "Test" );
}
Basically , you just have to replace "cmdtext" to "params"
like :
pawn Код:
CMD:test( playerid, params[ ] /* Here are the params */ )
{
    new id;
    id = strval( params ); // So, cmdtext here turns into params.
    return SendClientMessage( id, 0xAAAAAA, "Test" );
}
thats how easy it is
Credits to https://sampforum.blast.hk/showthread.php?tid=231496
Reply


Messages In This Thread
Zcmd / Strcmp - by Qur - 01.12.2011, 06:32
Re: Zcmd / Strcmp - by [C]ave[M]an - 01.12.2011, 06:37
Re: Zcmd / Strcmp - by Qur - 01.12.2011, 06:40
Re: Zcmd / Strcmp - by [C]ave[M]an - 01.12.2011, 06:44
Re: Zcmd / Strcmp - by Qur - 01.12.2011, 07:02
Re: Zcmd / Strcmp - by Wesley221 - 01.12.2011, 07:21
Re: Zcmd / Strcmp - by Qur - 01.12.2011, 07:25
Re: Zcmd / Strcmp - by cessil - 01.12.2011, 08:34

Forum Jump:


Users browsing this thread: 1 Guest(s)