Weird problem
#1

I made Ajail script, and I was working on the message to all, and it doesn't work.
This is just the message part, everything is defined and works but the message.
pawn Код:
GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "%s was admin jailed by %s for %s minutes, Reason: %s ",GivenName, sendername, jailTime, jailReason );
error line:        SendClientMessageToAll(playerid, 0xFF4646FF, string);

    }



    return 1;
}
pawn Код:
error 035: argument type mismatch (argument 2)
Reply
#2

Remove 'playerid, '.
Reply
#3

pawn Код:
format(string, sizeof(string), "%s was admin jailed by %s for %d minutes, Reason: %s ",GivenName, sendername, jailTime, jailReason );
I think this will be better.
Reply
#4

Still, the problem happens when I add messagetoall.
Reply
#5

Anyone ? please can you help me ?
Reply
#6

Read the responses! Remove "playerid, "
Reply
#7

http://wiki.sa-mp.co/wiki/SendClientMessageToAll
pawn Код:
SendClientMessageToAll(color, const message[]);
https://sampwiki.blast.hk/wiki/SendClientMessage
pawn Код:
SendClientMessage(playerid, color, const message[]);
Reply
#8

Doesn't work, can anyone help ? It doesn't send the message I want the message to be with the Format, can any one help ?
Reply
#9

The solution has been posted 2 times already, learn to fucking read.

pawn Код:
//SendClientMessageToAll(playerid, 0xFF4646FF, string); REMOVE 'playerid, '
SendClientMessageToAll(0xFF4646FF, string);
Reply
#10

Here... Use this

Код:
        GetPlayerName(playerid, sendername, sizeof(sendername)); 
        format(string, sizeof(string), "%s was admin jailed by %s for %s minutes, Reason: %s ",GivenName, sendername, jailTime, jailReason );
        SendClientMessageToAll(0xFF4646FF, string);

    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)