Chat bug
#1

Hey guys,

Am working on my own LA gamemode made form scratch but am having troubles with the chat system, I got the ooc working fine its just the normal push t then type and enter that the problem as when you do it it shows to all players and is normal

My code:
Код:
public OnPlayerText(playerid, text[])
{
    new pname[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(str, sizeof(str), "%s says: %s", pname, text);
    return 1;
}
Reply
#2

Don't return 1 on OnPlayerText. Return 0 to get rid of the normal SA:MP chat.
pawn Код:
public OnPlayerText(playerid, text[])
{
    new pname[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(str, sizeof(str), "%s says: %s", pname, text);
    return 0;
}
You also need to look up a ProxDetector function so it sends the message to only those who are near.
Reply
#3

I got 2 errors

Код:
C:\Users\Calum Smith\Desktop\LARP\gamemodes\larp.pwn(407) : error 017: undefined symbol "strreplace"
C:\Users\Calum Smith\Desktop\LARP\gamemodes\larp.pwn(409) : error 017: undefined symbol "ProxDetector"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
What do I need to do to fix it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)