Mask System IC CHAT +REP - 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: Mask System IC CHAT +REP (
/showthread.php?tid=567005)
Mask System IC CHAT +REP -
Trevor Gin - 09.03.2015
<REMOVED>
Re: Mask System IC CHAT +REP -
J0sh... - 09.03.2015
pawn Код:
if(Masked[playerid] == 1)
{
format(string, sizeof(string), "%s Stranger says: %s", accent, text);
SendClientMessageEx(i, COLOR_FADE1, string);
return 0;
}
Something like that?
Re: Mask System IC CHAT +REP -
Trevor Gin - 09.03.2015
<REMOVED>
Re: Mask System IC CHAT +REP -
J0sh... - 09.03.2015
Errors?
If it's the string error just add
new string[128];
just before the format
Re: Mask System IC CHAT +REP -
Trevor Gin - 09.03.2015
<REMOVED>
Re: Mask System IC CHAT +REP -
J0sh... - 10.03.2015
Quote:
Originally Posted by ShadeWalker
2 Warnings
Код:
./includes/callbacks.pwn(6674) : warning 217: loose indentation
./includes/callbacks.pwn(6676) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
and didn't work IG, leave it i think it's hard or u need pro scripter btw thank you for helping
|
Did you copy and paste?
(Let me get a blank gm hold for one second)
2nd warning: remove new string[128];
1st. Indent when you C&P The two { are over to the left.
pawn Код:
#include <a_samp>
new Masked[MAX_PLAYERS];
main(){}
public OnPlayerText(playerid, text[])
{
if(Masked[playerid] == 1)
{
new string[128];
format(string, sizeof(string), "Stranger says: %s", text);
SendClientMessageToAll(-1, string);
return 0;
}
return 0;
}
public OnPlayerConnect(playerid)
{
Masked[playerid]=1;
return 1;
}
Worked for me...
Re: Mask System IC CHAT +REP -
CalvinC - 10.03.2015
Just make your sendername function return "stranger" if the player is masked, and return his actual name if not.