PDA

View Full Version : Need little help with this (OnPlayerConnect)


ChristianIvann09
19/03/2014, 11:33 AM
new connectstring[64], cname[MAX_PLAYER_NAME];
GetPlayerName(playerid,cname,MAX_PLAYER_NAME);
format(connectstring,sizeof (connectstring),"%s has joined American Streets Roleplay....",cname);
ABroadCast(COLOR_YELLOW, connectstring, 1);

I want if Player joins the server.. Only the ON DUTY admin will see the message

Admin Duty Variable
AdminDuty

Calabresi
19/03/2014, 11:35 AM
How about inspecting the code I gave you on previous thread and trying to write something THAT easy by yourself? Scripting Help forums are not for getting your gamemode completed, we help you to make you learn.

ChristianIvann09
19/03/2014, 11:38 AM
How about inspecting the code I gave you on previous thread and trying to write something THAT easy by yourself? Scripting Help forums are not for getting your gamemode completed, we help you to make you learn.

I was thinking about your code you give to me..

Im not sure of that

Hanuman
19/03/2014, 11:45 AM
for(new i=0;i<MAX_PLAYERS;i++)
{
if(OnDutyAdmin[i] == 1)
{
new connectstring[64], cname[MAX_PLAYER_NAME];
GetPlayerName(playerid,cname,MAX_PLAYER_NAME);
format(connectstring,sizeof (connectstring),"%s has joined American Streets Roleplay....",cname);
ABroadCast(COLOR_YELLOW, connectstring, 1);
}
}
helpfull?

Calabresi
19/03/2014, 11:48 AM
I was thinking about your code you give to me..

Im not sure of that

new connectstring[64], cname[MAX_PLAYER_NAME];
GetPlayerName(playerid,cname,MAX_PLAYER_NAME);
format(connectstring,sizeof (connectstring),"%s has joined American Streets Roleplay....",cname);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(AdminDuty[i] == 1) SendClientMessage(i, -1, connectstring);
}

ChristianIvann09
19/03/2014, 11:51 AM
new connectstring[64], cname[MAX_PLAYER_NAME];
GetPlayerName(playerid,cname,MAX_PLAYER_NAME);
format(connectstring,sizeof (connectstring),"%s has joined American Streets Roleplay....",cname);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(AdminDuty[i] == 1) SendClientMessage(i, -1, connectstring);
}

BTW, what is that..

if(AdminDuty[i] == 1) SendClientMessage(i, -1, connectstring);

What is the mean of -1 in that code.. is that helpful?

Hanuman
19/03/2014, 11:54 AM
lol -1 is white colour

Calabresi
19/03/2014, 11:56 AM
BTW, what is that..

if(AdminDuty[i] == 1) SendClientMessage(i, -1, connectstring);

What is the mean of -1 in that code.. is that helpful?

http://wiki.sa-mp.com/wiki/SendClientMessage

SendClientMessage(playerid, color, const message[])

Stinged
19/03/2014, 12:35 PM
Oh please, if you don't even know how SendClientMessage works...
Go read the wiki and watch some tutorials.