SendClientMEssage
#1

Hi, i made this script but it doesn't work, can someone help me, here is the script:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/fishhelp", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0x000000, "Fisherman: Fisherman takes boat from base [Dock, island, what ever], \r types /work and goed to checkpoint. Checkpoint is in sea, he fishes here \n [so he needs to stay there a while[maybe drive thru markers]].\n Once loaded he goes to base and unloads the fish.\n ");
        return 1;
    }
    return 0;
}
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/fishhelp", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0x300FFAAB, "Fisherman: Fisherman takes boat from base [Dock, island, what ever], \r types /work and goed to checkpoint. Checkpoint is in sea, he fishes here \n [so he needs to stay there a while[maybe drive thru markers]].\n Once loaded he goes to base and unloads the fish.\n ");
        return 1;
    }
    return 0;
}
Reply
#3

If i'm not mistaken, using return 0; is like saying, ignore the command....
Reply
#4

Quote:
Originally Posted by uprp
Посмотреть сообщение
If i'm not mistaken, using return 0; is like saying, ignore the command....
if like he type /fsihghzelp it will return a SERVER: UNKNOWN COMMand and it doesnt have any sence with his problem, his probleme is the colour name, he used 0x000000 and thats not a colour code
Reply
#5

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/fishhelp", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0x300FFAAB, "Fisherman: Fisherman takes boat from base [Dock, island, what ever], \r types /work and goed to checkpoint. Checkpoint is in sea, he fishes here \n [so he needs to stay there a while[maybe drive thru markers]].\n Once loaded he goes to base and unloads the fish.\n ");
        return 1;
    }
    return 0;
}
Sorry not working.. also changed color code not working...
Reply
#6

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/fishhelp", cmdtext, true, 9) == 0)
    {
        SendClientMessage(playerid, 0x300FFAAB, "Fisherman: Fisherman takes boat from base [Dock, island, what ever],  types /work and goed to checkpoint. Checkpoint is in sea, he fishes here  [so he needs to stay there a while[maybe drive thru markers]. Once loaded he goes to base and unloads the fish.");
        return 1;
    }
    return 0;
}
Reply
#7

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext,"/fishhelp",true) == 0)
    {
        SendClientMessage(playerid, 0x300FFAAB, "Fisherman: Fisherman takes boat from base [Dock, island, what ever],  types /work and goed to checkpoint. Checkpoint is in sea, he fishes here  [so he needs to stay there a while[maybe drive thru markers]. Once loaded he goes to base and unloads the fish.");
        return 1;
    }
    return 1;
}
Reply
#8

Quote:
Originally Posted by SomebodyAndMe
Посмотреть сообщение
Hi, i made this script but it doesn't work, can someone help me, here is the script:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/fishhelp", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0x000000, "Fisherman: Fisherman takes boat from base [Dock, island, what ever], \r types /work and goed to checkpoint. Checkpoint is in sea, he fishes here \n [so he needs to stay there a while[maybe drive thru markers]].\n Once loaded he goes to base and unloads the fish.\n ");
        return 1;
    }
    return 0;
}
The only problem with it was your Color coding,

use Naruto's Example, if you want just PM me and I can give you some Color Defines so you just type COLOR_NAME or whatever.
Reply
#9

You can't use \n, \r or anything like them in client message.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/fishhelp", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0x000000, "Fisherman: Fisherman takes boat from base [Dock, island, what ever], types /work and goed to checkpoint. Checkpoint is in sea, he fishes here");
        SendClientMessage(playerid, 0x000000, "[so he needs to stay there a while[maybe drive thru markers]].");
        SendClientMessage(playerid, 0x000000, "Once loaded he goes to base and unloads the fish.");
        return 1;
    }
    return 0;
}
Reply
#10

I dont use strcmp but try
pawn Код:
if (strcmp("/fishhelp", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,-1, "Fisherman: Fisherman takes boat from base [Dock, island, what ever], types /work and goed to checkpoint. Checkpoint is in sea, he fishes here");
        SendClientMessage(playerid,-1, "[so he needs to stay there a while[maybe drive thru markers]].");
        SendClientMessage(playerid,-1, "Once loaded he goes to base and unloads the fish.");
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)