Simple questions
#1

How do I actually make a /b and /o command?

I'd appreciate it if somebody told me, thanks.
Reply
#2

pawn Код:
if(strcmp(cmdtext,"/b", true) == 0)
{
    //whatever /b does
}

if(strcmp(cmdtext,"/o", true) == 0)
{
    //whatever /o does
}
Reply
#3

Of course I know that? I mean, how do I MAKE IT, I mean, what to use?
Reply
#4

what do you want them to do?
Reply
#5

Thanks for giving so much information about what the commands should do.

pawn Код:
if(strcmp(cmdtext,"/b", true) == 0)
{
    SendClientMessage(playerid, 0xFF0000FF, "b");
}

if(strcmp(cmdtext,"/o", true) == 0)
{
    SendClientMessage(playerid, 0xFF0000FF, "o");
}
Reply
#6

Oh my fault for not including that, I'm so sorry. Ehm.. Well I basically want them for OOC purposes on a roleplay server. But I'm not quite certain what to use within the command to create it.
Reply
#7

Well, i dont really know what OCC does xD but ehh.

pawn Код:
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;
}
Reply
#8

Quote:
Originally Posted by CyberGhost
Посмотреть сообщение
Thanks for giving so much information about what the commands should do.

pawn Код:
if(strcmp(cmdtext,"/b", true) == 0)
{
    SendClientMessage(playerid, 0xFF0000FF, "b");
}

if(strcmp(cmdtext,"/o", true) == 0)
{
    SendClientMessage(playerid, 0xFF0000FF, "o");
}
I lol'd at this!
Reply
#9

The /b is basically local but the /o is correct I guess, thanks for that. But I do prefer learning over copying straight off, thanks.
Reply
#10

I created a cmd with zcmd & sscanf, are you sure you don't want it in zcmd & sscanf instead of strcmp?

Note: You cannot use zcmd & strcmp at the same time
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)