Need little help with this (OnPlayerConnect)
#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);
I want if Player joins the server.. Only the ON DUTY admin will see the message

Admin Duty Variable
Код:
AdminDuty
Reply
#2

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.
Reply
#3

Quote:
Originally Posted by Calabresi
Посмотреть сообщение
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
Reply
#4

Код:
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?
Reply
#5

Quote:
Originally Posted by ChristianIvann09
Посмотреть сообщение
I was thinking about your code you give to me..

Im not sure of that
pawn Код:
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);
    }
Reply
#6

Quote:
Originally Posted by Calabresi
Посмотреть сообщение
pawn Код:
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?
Reply
#7

lol -1 is white colour
Reply
#8

Quote:
Originally Posted by ChristianIvann09
Посмотреть сообщение
BTW, what is that..

Код:
  if(AdminDuty[i] == 1) SendClientMessage(i, -1, connectstring);
What is the mean of -1 in that code.. is that helpful?
https://sampwiki.blast.hk/wiki/SendClientMessage

SendClientMessage(playerid, color, const message[])
Reply
#9

Oh please, if you don't even know how SendClientMessage works...
Go read the wiki and watch some tutorials.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)