SA-MP Forums Archive
SendClientMessage Doesn't Work - 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 Doesn't Work (/showthread.php?tid=413021)



SendClientMessage Doesn't Work - AphexCCFC - 03.02.2013

pawn Код:
C:\Documents and Settings\Aphex\Desktop\Domination Roleplay\gamemodes\MySQL.pwn(442) : error 035: argument type mismatch (argument 2)
Line 442:

pawn Код:
SendClientMessage(playerid, Green, "You have chosen to quit the server.");



AW: SendClientMessage Doesn't Work - BiosMarcel - 03.02.2013

Have you defined Green?


Re: SendClientMessage Doesn't Work - AphexCCFC - 03.02.2013

pawn Код:
#define Green   "{66FF00}"



Re: SendClientMessage Doesn't Work - AphexCCFC - 03.02.2013

If I change it to:

pawn Код:
SendClientMessageToAll(Green, "You have chosen to quit the server.");
It works, but I don't want that <.<


Re: SendClientMessage Doesn't Work - DrDoom151 - 03.02.2013

Try

pawn Код:
#define Color_Green 0x66FF00FF

and

SendClientMessage(playerid, Color_Green, "You have chosen to quit the server.");



Re: SendClientMessage Doesn't Work - SnG.Scot_MisCuDI - 03.02.2013

Where are you placing this code


Re: SendClientMessage Doesn't Work - Mr.Anonymous - 03.02.2013

Try:
pawn Код:
SendClientMessage(playerid, -1, "{66FF00}You have chosen to quit the server.");



Re: SendClientMessage Doesn't Work - AphexCCFC - 03.02.2013

Nope, still error. Here is the script:

pawn Код:
#define COLOR_GREEN "{66FF00}"
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    //================================================================//
    //                              MySQL part                        //
    //================================================================//
    if(dialogid == DIALOG_REGISTER)
    {
        if(response)
        {
            if(!strlen(inputtext) || strlen(inputtext) > 100)
            {
                SendMessage(playerid, "~r~Error~w~: You must enter a password between 1 and 100 characters.");
                ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""Blue"Account Registration",""White"Welcome to "Red""SERVER_NAME""White".\n"White"Your character has not been registered.\n"White"Please create a password below:", "Register", "Quit");
            }
            else if(strlen(inputtext) > 0 && strlen(inputtext) < 100)
            {
                new escpass[100];
                mysql_real_escape_string(inputtext, escpass);
                MySQL_Register(playerid, escpass);
                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, ""Blue"Account Login", ""White"Welcome back to "Red""SERVER_NAME""White".\n"White"This character already exists in the database.\n"White"Please enter the password below:", "Login", "Quit");
            }
        }
        if(!response)
        {
            SendClientMessage(playerid, COLOR_GREEN, "You have chosen to quit the server.");
            Kick(playerid);
        }
    }



Re: SendClientMessage Doesn't Work - AphexCCFC - 03.02.2013

Quote:
Originally Posted by Mr.Anonymous
Посмотреть сообщение
Try:
pawn Код:
SendClientMessage(playerid, -1, "{66FF00}You have chosen to quit the server.");
This works, I don't understand.


AW: SendClientMessage Doesn't Work - Blackazur - 03.02.2013

Try:

Код:
SendClientMessage(playerid,0x66FF00FF,"You have chosen to quit the server.");