SA-MP Forums Archive
SendClientMEssage - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SendClientMEssage (/showthread.php?tid=280360)



SendClientMEssage - SomebodyAndMe - 31.08.2011

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;
}



Re : SendClientMEssage - Naruto_Emilio - 31.08.2011

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;
}



Re: SendClientMEssage - uprp - 31.08.2011

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


Re : Re: SendClientMEssage - Naruto_Emilio - 31.08.2011

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


Re: Re : SendClientMEssage - SomebodyAndMe - 31.08.2011

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...


Re : SendClientMEssage - Naruto_Emilio - 31.08.2011

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;
}



Re: SendClientMEssage - Amel_PAtomAXx - 31.08.2011

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;
}



Re: SendClientMEssage - Swyft™ - 31.08.2011

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.


Re: SendClientMEssage - =WoR=Varth - 01.09.2011

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;
}



Re: SendClientMEssage - Tanush123 - 01.09.2011

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;
    }