Why that message dosn't work. - 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: Why that message dosn't work. (
/showthread.php?tid=376722)
Why that message dosn't work. -
Gangster-rocks - 11.09.2012
pawn Код:
switch(reason)
{
new str[128];
case 0:
{
format(str,128,"%s has left the server ((Crashed)",GetPlayersName(playerid));
SendClientMessageToAll(-1,str);
}
case 1:
{
format(str,128,"%s has left the server ((Leaving)",GetPlayersName(playerid));
SendClientMessageToAll(-1,str);
}
case 2:
{
format(str,128,"%s has left the server ((Kicked/Banned)",GetPlayersName(playerid));
SendClientMessageToAll(-1,str);
}
}
Re: Why that message dosn't work. -
kbalor - 11.09.2012
To get Ideas
pawn Код:
new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
switch(reason)
{
case 0: format(string, sizeof(string), "%s has left the server. (Crashed)", pname);
case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pname);
case 2: format(string, sizeof(string), "%s has left the server. (Kicked)", pname);
}
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
Re: Why that message dosn't work. - Glint - 11.09.2012
And format your code then SendClientMessageToAll you don't need to use it in every single case.
Re: Why that message dosn't work. -
Gangster-rocks - 11.09.2012
K thanks all
+rep
EDIT:LOL I CAN'T GIVE KABLOR REP