OnPlayerText Problem
#1

Hi
I have problem i downloaded cell and i put it in my gm and When i type any thing in the chat it show my phone number and i am not calling any one
here the code
pawn Код:
public OnPlayerText(playerid, text[])
{
    if (!player[playerid][calling] || player[playerid][caller] == 255)
    {
        new string[128];
        format(string, 255, "(%d) %s", player[playerid][number], text);
        SendPlayerMessageToAll(playerid, string);
    }
    else
    {
        new str[158];
        GetPlayerName(playerid, str, 16);
        format(str, sizeof(str), "(Cellphone)%s : %s", str, text);
        SendClientMessage(player[playerid][caller], 0xBFC0C2FF, str);
        SendClientMessage(playerid, 0xBFC0C2FF, str);
    return 1;
 }


    if(afk[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_NORMALRED, "You can not chat while in AFK mode. Type /back to return");
        return 1;
    }
Reply
#2

Let me quote myself:
Quote:
Originally Posted by Vince
Посмотреть сообщение
*sigh* You can't expect us to fix your "new" (read: copy-pasted) gamemode for you every time. Learn to code. I am absolutely fed up with people whose postcounts for 90% consists of 'bump help naw!' replies.
Obviously, you don't understand jack shit. Copy-pasting stuff and just hoping that it will work - and subsequently opening new topics if it doesn't work - gets you nowhere. Take this piece of code, for example:

pawn Код:
if (!player[playerid][calling] || player[playerid][caller] == 255)
    {
        new string[128];
        format(string, 255, "(%d) %s", player[playerid][number], text);
        SendPlayerMessageToAll(playerid, string);
    }
If the player is not (! operator) calling, then the phone number (player[playerid][number]) should be shown? Does that make any sense to you?
Reply
#3

i fixed it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)