OnPlayerConnect bug
#5

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
SendClientMessage(0xFFFFFFAA,string);
Here is your problem
https://sampwiki.blast.hk/wiki/SendClientMessage
Syntax is SendClientMessage(playerid, color, const message[]);
And you don't have any playerid to send the client msg to, other than that your code works just fine.
Thanks for the help,
But recently I've tried to remake the message system for only admins, whoever joins, leaves or times out, a message is sent to admins, and I failed on this one too, seems like I'm in need of your help.
So this doesn't work.

public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
switch(reason)
{
if (IsPlayerConnected(i))
{
if (IsPlayerAdmin(i))
case 0: format(string, sizeof(string), "%s has left the server. (Lost Connection)", 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);
}
SendClientMessage(playerid, -1, params);
return 1;
}



EDIT: I'm researching on ****** and everything I find useful like a 1000 times to make it work, but when I am stuck on something, I'm just posting here for help.
Reply


Messages In This Thread
OnPlayerConnect bug - by DRP - 17.01.2016, 12:47
Re: OnPlayerConnect bug - by GeneralAref - 17.01.2016, 12:54
Re: OnPlayerConnect bug - by DRP - 17.01.2016, 12:59
Re: OnPlayerConnect bug - by PrO.GameR - 17.01.2016, 14:22
Re: OnPlayerConnect bug - by DRP - 17.01.2016, 14:28
Re: OnPlayerConnect bug - by d1git - 17.01.2016, 14:38
Re: OnPlayerConnect bug - by DRP - 17.01.2016, 14:40

Forum Jump:


Users browsing this thread: 1 Guest(s)