Text doesn't show
#1

pawn Код:
CMD:tk(playerid, params[])
{
    if(mode[playerid] != 3) return 1;
    if(GetPlayerTeam(playerid) != 233) return 0;
    new Float:xyz[3], string[500], price;
    GetPlayerPos(playerid, xyz[0], xyz[1], xyz[2]);
    if(IsPlayerInRangeOfPoint(GetNearestPlayer(playerid), 25.0, xyz[0], xyz[1], xyz[2]))
    {
        if(!GetPlayerWantedLevel(GetNearestPlayer(playerid))) return SPM(playerid, "ERROR: The target is a civilian!");
        price = GetPlayerWantedLevel(GetNearestPlayer(playerid))*1000;
        GivePlayerMoney(playerid, price);
        GivePlayerMoney(GetNearestPlayer(playerid), -price);
        GivePlayerScore(playerid, 2);
        PlayerInfo[playerid][CNRScore] += 3;
        format(string, sizeof(string), "{FF0000}%s [%d]{FFFFFF} has issued a ticket {FF0000}%s [%d]{FFFFFF} for having %d stars on his head! +$%d, +2 scores, and +3 CNR Score!",GetName(playerid),playerid,GetName(GetNearestPlayer(playerid)),GetNearestPlayer(playerid),GetPlayerWantedLevel(GetNearestPlayer(playerid)),price);
                SCNRM(string);
        SetPlayerWantedLevel(GetNearestPlayer(playerid), 0);
    }
    else SPM(playerid, "ERROR: No players on range!");
    return 1;
}
pawn Код:
stock SCNRM(string[])
{
    new string1[500];
    format(string1, sizeof(string1), "{FF0000}[CNR]: {FF0000}%s",string);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(mode[i] == 3 && modeid[i] == 1)
        {
            SendClientMessage(i, -1, string1);
        }
    }
}
That is my (/tk) Ticket command. The problem is if I use it(it's fully functional) the text doesn't show(the "%s [%d]" things).

On the other hand, every SCNRM beside this script is working. I wonder why does this isn't working.

EDIT: I've tried Laurey's, still didn't work.
I don't want to use SendClientMessageToAll as it would spam the global chat.
Reply
#2

Try not using your custom stock, maybe try the default one, that might be working

pawn Код:
SendClientMessage(playerid, 1, string);
Reply
#3

I have tried not using my own stock-- it's still the same.
Reply
#4

pawn Код:
stock SCNRM(string[])
{
    new string1[500];
    format(string1, sizeof(string1), "{FF0000}[CNR]: {FF0000}%s",string);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(mode[i] == 3 && modeid[i] == 1)
        {
            SendClientMessage(i, -1, string1);
        }
    }
    return 1;
}
Reply
#5

Alright. Let me try that.

If I bump the thread it means it still didn't.

EDIT: Sorry I forgot the rules, I can't bump.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)