SA-MP Forums Archive
Help with 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: Help with SendClientMessage (/showthread.php?tid=449635)



Help with SendClientMessage - arjanforgames - 09.07.2013

pawn Код:
CMD:smelt(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -53.2012,-1133.2292,1.0781))
    {
        if(PlayerInfo[playerid][pOres] >= 1)
        {
            TogglePlayerControllable(playerid, 0);
            SetTimerEx("MeltingOres", 10000, false, "i", playerid);
            SendClientMessage(playerid, COL_WHITE, "You started melting the ores"); //LINE 435
            SendClientMessage(playerid, COL_WHITE, "Please wait until all of your ores are melted"); //LINE 436
            SendClientMessage(playerid, COL_WHITE, "It will take 10 seconds"); //LINE 437
        }
    }
    return 1;
}
pawn Код:
NOT IMPORTANT LOCATIONS(435) : error 035: argument type mismatch (argument 2)
NOT IMPORTANT LOCATIONS(436) : error 035: argument type mismatch (argument 2)
NOT IMPORTANT LOCATIONS(437) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.



Re: Help with SendClientMessage - Calabresi - 09.07.2013

COL_WHITE is not defined well. It must be in format like;
pawn Код:
#define COLOR_GREY 0xAFAFAFAA



Re: Help with SendClientMessage - Calabresi - 09.07.2013

(Double post by mistake.)


Re: Help with SendClientMessage - doreto - 09.07.2013

pawn Код:
CMD:smelt(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -53.2012,-1133.2292,1.0781))
    {
        if(PlayerInfo[playerid][pOres] >= 1)
        {
            TogglePlayerControllable(playerid, 0);
            SetTimerEx("MeltingOres", 10000, false, "i", playerid);
            SendClientMessage(playerid, -1, "You started melting the ores");
            SendClientMessage(playerid, -1, "Please wait until all of your ores are melted");
            SendClientMessage(playerid, -1, "It will take 10 seconds");  // -1 is white too
        }
    }
    return 1;
}



Re : Help with SendClientMessage - yusei - 09.07.2013

#define COL_WHITE 0xFFFFFFAA