23.04.2011, 16:51
How do I actually make a /b and /o command?
I'd appreciate it if somebody told me, thanks.
I'd appreciate it if somebody told me, thanks.
if(strcmp(cmdtext,"/b", true) == 0)
{
//whatever /b does
}
if(strcmp(cmdtext,"/o", true) == 0)
{
//whatever /o does
}
if(strcmp(cmdtext,"/b", true) == 0)
{
SendClientMessage(playerid, 0xFF0000FF, "b");
}
if(strcmp(cmdtext,"/o", true) == 0)
{
SendClientMessage(playerid, 0xFF0000FF, "o");
}
if(strcmp(cmdtext,"/b", true) == 0)
{
new text[128];
if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /b (text)");
{
format(string,sizeof(string),"[B]: %s", text);
SendClientMessageToAll(0xFFFFFFAA, string);
}
return 1;
}
if(strcmp(cmdtext,"/o", true) == 0)
{
new text[128];
if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /o (text)");
{
format(string,sizeof(string),"[O]: %s", text);
SendClientMessageToAll(0xFFFFFFAA, string);
}
return 1;
}
Thanks for giving so much information about what the commands should do.
pawn Код:
|