SA-MP Forums Archive
Please help meeee !! :'( - 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: Please help meeee !! :'( (/showthread.php?tid=365678)



Please help meeee !! :'( - **ahm_ed** - 03.08.2012

hello,
i use GM, hes filescript don't work (errors)
in Gm: no one can chat, if i write somethink and i press ENTER, don't show, i check filescript there is CMDS : /chaton, /chatoff
CMDS don't work, and i delete it,i didn't know
how i enable chat, or can someone give me /chaton, /chatoff cmds, please!

PS : Sorry for my BAD English.



Re: Please help meeee !! :'( - iGetty - 03.08.2012

Under OnPlayerText, paste the code here.


Re : Please help meeee !! :'( - **ahm_ed** - 03.08.2012

what CODE ?


Re: Please help meeee !! :'( - iGetty - 03.08.2012

The whole of OnPlayerText.

Simple.


Re : Please help meeee !! :'( - **ahm_ed** - 03.08.2012

im sorry, but i didn't understund


Re: Please help meeee !! :'( - sampplayer12 - 03.08.2012

Quote:
Originally Posted by iGetty
View Post
Under OnPlayerText, paste the code here.
Do as he said


Re: Please help meeee !! :'( - kurzagfx - 03.08.2012

If you dont know ANYTHING about Troubleshooting Basic error's in Scripts or FS's I recomend rethinking your server, or atleast hire a Scriptor who can help you. If you dont, youll be asking for help alot on here.


Re: Please help meeee !! :'( - iGetty - 03.08.2012

Quote:
Originally Posted by kurzagfx
View Post
If you dont know ANYTHING about Troubleshooting Basic error's in Scripts or FS's I recomend rethinking your server, or atleast hire a Scriptor who can help you. If you dont, youll be asking for help alot on here.
There's two ways to learn.

1) Spam these forums for help.
2) SA-MP Wiki.


Re : Please help meeee !! :'( - **ahm_ed** - 03.08.2012

ok, can some one script : /chaton, /chatoff for me ? plzz


Re: Please help meeee !! :'( - iGetty - 03.08.2012

pawn Code:
#include <a_samp>
#include <zcmd>

new ChatOn;

public OnGameModeInit()
{
    ChatOn = 1;
}

public OnPlayerText(playerid, text[])
{
    if(ChatOn == 0)
    {
        SendClientMessage(playerid, -1, "Chat is off.");
        return 0;
    }
    else
    {
        new string[128], pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pname, sizeof(pname));
        format(string, sizeof(string), "%s (%d): %s", pname, playerid, text);
        SendClientMessageToAll(-1, string);
        return 0;
    }
}

command(chaton, playerid, params[])
{
    if(ChatOn == 0)
    {
        ChatOn = 1;
    }
    return 1;
}

command(chatoff, playerid, params[])
{
    if(ChatOn == 1)
    {
        ChatOn = 0;
    }
    return 1;
}
Simple.


Re : Please help meeee !! :'( - **ahm_ed** - 03.08.2012

error :
C:\Documents and Settings\******\Bureau\SA-MP Hard Mission\filterscripts\chat.pwn(21) : error 017: undefined symbol "pname"


Re: Please help meeee !! :'( - iGetty - 03.08.2012

Check again, mate.
I made a mistake, so re-copy the code above.


Re : Please help meeee !! :'( - **ahm_ed** - 03.08.2012

i don't know how,
i don't know how to script, just plz help me,
i wont spam for help, btw server is ready, only chat problem


Re: Re : Please help meeee !! :'( - iGetty - 03.08.2012

Quote:
Originally Posted by **ahm_ed**
View Post
i don't know how,
i don't know how to script, just plz help me,
i wont spam for help, btw server is ready, only chat problem
I JUST TOLD YOU THE SCRIPT!

PASTE... THE... OnPlayerUpdate!

Fuck sake.


Re : Please help meeee !! :'( - **ahm_ed** - 03.08.2012

sorry, im private,
CMDS are working
thank you very much


Re: Please help meeee !! :'( - iGetty - 03.08.2012

-.-, no worries.

Sorry for losing my head -.-.